title
Documentation for the postgresql-schema Generator
Property
Value
Notes
generator name
postgresql-schema
pass this to the generate command after -g
generator stability
BETA
generator type
SCHEMA
generator language
Postgresql
generator default templating engine
mustache
helpTxt
Generates a PostgreSQL schema based on the schema defined in the OpenAPI specification (v2, v3)
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.
Option
Description
Values
Default
defaultDatabaseName
Database name that will be used for all generated PostgreSQL DDL and DML statements.
idAutoIncEnabled
If true
, generates autoincrement PostgreSQL types SERIAL
and BIGSERIAL
for int32
and int64
respectively for integer fields with name 'id'.
false
identifierNamingConvention
Naming convention of PostgreSQL idebntifiers (table names and column names).
snake_case Transform named to 'snake_case'. original Leave original names as in YAML
file.
snake_case
jsonDataType
Use of PostgreSQL data types for complex model properties.
json Generate JSON
fields. Value is stored in JSON
data type field as human-readable text. Value compliance with JSON standard is checked. jsonb Generate JSONB
fields. Value is stored in JSONB
data type field in binary format. JSONB
data type is generally more efficient than JSON
but it is not human-readable. Value compliance with JSON standard is checked. off Generate TEXT
fields. Just store the value as plain text. Value compliance with JSON standard is not checked.
json
namedParametersEnabled
Generates query examples with named variables in value placeholders (eg.:name
,:quantity
) if true
. Otherwise, generates question marks ?
in value placeholders.
false
Type/Alias
Instantiated By
BigDecimal
ByteArray
Date
DateTime
URI
UUID
bool
boolean
byte
char
date
double
file
float
int
integer
long
mixed
number
short
string
void
a
abort
abs
absent
absolute
access
according
acos
action
ada
add
admin
after
aggregate
all
allocate
also
alter
always
analyse
analyze
and
any
any_value
are
array
array_agg
array_max_cardinality
as
asc
asensitive
asin
assertion
assignment
asymmetric
at
atan
atomic
attach
attribute
attributes
authorization
avg
backward
base64
before
begin
begin_frame
begin_partition
bernoulli
between
bigint
binary
bit
bit_length
blob
blocked
bom
boolean
both
breadth
btrim
by
c
cache
call
called
cardinality
cascade
cascaded
case
cast
catalog
catalog_name
ceil
ceiling
chain
chaining
char
char_length
character
character_length
character_set_catalog
character_set_name
character_set_schema
characteristics
characters
check
checkpoint
class
class_origin
classifier
clob
close
cluster
coalesce
cobol
collate
collation
collation_catalog
collation_name
collation_schema
collect
column
column_name
columns
command_function
command_function_code
comment
comments
commit
committed
compression
concurrently
condition
condition_number
conditional
configuration
conflict
connect
connection
connection_name
constraint
constraint_catalog
constraint_name
constraint_schema
constraints
constructor
contains
content
continue
control
conversion
convert
copartition
copy
corr
corresponding
cos
cosh
cost
count
covar_pop
covar_samp
create
cross
csv
cube
cume_dist
current
current_catalog
current_date
current_default_transform_group
current_path
current_role
current_row
current_schema
current_time
current_timestamp
current_transform_group_for_type
current_user
cursor
cursor_name
cycle
data
database
datalink
date
datetime_interval_code
datetime_interval_precision
day
db
deallocate
dec
decfloat
decimal
declare
default
defaults
deferrable
deferred
define
defined
definer
degree
delete
delimiter
delimiters
dense_rank
depends
depth
deref
derived
desc
describe
descriptor
detach
deterministic
diagnostics
dictionary
disable
discard
disconnect
dispatch
distinct
dlnewcopy
dlpreviouscopy
dlurlcomplete
dlurlcompleteonly
dlurlcompletewrite
dlurlpath
dlurlpathonly
dlurlpathwrite
dlurlscheme
dlurlserver
dlvalue
do
document
domain
double
drop
dynamic
dynamic_function
dynamic_function_code
each
element
else
empty
enable
encoding
encrypted
end
end-exec
end_frame
end_partition
enforced
enum
equals
error
escape
event
every
except
exception
exclude
excluding
exclusive
exec
execute
exists
exp
explain
expression
extension
external
extract
false
family
fetch
file
filter
final
finalize
finish
first
first_value
flag
float
floor
following
for
force
foreign
format
fortran
forward
found
frame_row
free
freeze
from
fs
fulfill
full
function
functions
fusion
g
general
generated
get
global
go
goto
grant
granted
greatest
group
grouping
groups
handler
having
header
hex
hierarchy
hold
hour
id
identity
if
ignore
ilike
immediate
immediately
immutable
implementation
implicit
import
in
include
including
increment
indent
index
indexes
indicator
inherit
inherits
initial
initially
inline
inner
inout
input
insensitive
insert
instance
instantiable
instead
int
integer
integrity
intersect
intersection
interval
into
invoker
is
isnull
isolation
join
json
json_array
json_arrayagg
json_exists
json_object
json_objectagg
json_query
json_scalar
json_serialize
json_table
json_table_primitive
json_value
k
keep
key
key_member
key_type
keys
label
lag
language
large
last
last_value
lateral
lead
leading
leakproof
least
left
length
level
library
like
like_regex
limit
link
listagg
listen
ln
load
local
localtime
localtimestamp
location
locator
lock
locked
log
log10
logged
lower
lpad
ltrim
m
map
mapping
match
match_number
match_recognize
matched
matches
materialized
max
maxvalue
measures
member
merge
merge_action
message_length
message_octet_length
message_text
method
min
minute
minvalue
mod
mode
modifies
module
month
more
move
multiset
mumps
name
names
namespace
national
natural
nchar
nclob
nested
nesting
new
next
nfc
nfd
nfkc
nfkd
nil
no
none
normalize
normalized
not
nothing
notify
notnull
nowait
nth_value
ntile
null
null_ordering
nullable
nullif
nulls
number
numeric
object
occurrence
occurrences_regex
octet_length
octets
of
off
offset
oids
old
omit
on
one
only
open
operator
option
options
or
order
ordering
ordinality
others
out
outer
output
over
overflow
overlaps
overlay
overriding
owned
owner
p
pad
parallel
parameter
parameter_mode
parameter_name
parameter_ordinal_position
parameter_specific_catalog
parameter_specific_name
parameter_specific_schema
parser
partial
partition
pascal
pass
passing
passthrough
password
past
path
pattern
per
percent
percent_rank
percentile_cont
percentile_disc
period
permission
permute
pipe
placing
plan
plans
pli
policy
portion
position
position_regex
power
precedes
preceding
precision
prepare
prepared
preserve
prev
primary
prior
private
privileges
procedural
procedure
procedures
program
prune
ptf
public
publication
quote
quotes
range
rank
read
reads
real
reassign
recheck
recovery
recursive
ref
references
referencing
refresh
regr_avgx
regr_avgy
regr_count
regr_intercept
regr_r2
regr_slope
regr_sxx
regr_sxy
regr_syy
reindex
relative
release
rename
repeatable
replace
replica
requiring
reset
respect
restart
restore
restrict
result
return
returned_cardinality
returned_length
returned_octet_length
returned_sqlstate
returning
returns
revoke
right
role
rollback
rollup
routine
routine_catalog
routine_name
routine_schema
routines
row
row_count
row_number
rows
rpad
rtrim
rule
running
savepoint
scalar
scale
schema
schema_name
schemas
scope
scope_catalog
scope_name
scope_schema
scroll
search
second
section
security
seek
select
selective
self
semantics
sensitive
sequence
sequences
serializable
server
server_name
session
session_user
set
setof
sets
share
show
similar
simple
sin
sinh
size
skip
smallint
snapshot
some
sort_direction
source
space
specific
specific_name
specifictype
sql
sqlcode
sqlerror
sqlexception
sqlstate
sqlwarning
sqrt
stable
standalone
start
state
statement
static
statistics
stddev_pop
stddev_samp
stdin
stdout
storage
stored
strict
string
strip
structure
style
subclass_origin
submultiset
subscription
subset
substring
substring_regex
succeeds
sum
support
symmetric
sysid
system
system_time
system_user
t
table
table_name
tables
tablesample
tablespace
tan
tanh
target
temp
template
temporary
text
then
through
ties
time
timestamp
timezone_hour
timezone_minute
to
token
top_level_count
trailing
transaction
transaction_active
transactions_committed
transactions_rolled_back
transform
transforms
translate
translate_regex
translation
treat
trigger
trigger_catalog
trigger_name
trigger_schema
trim
trim_array
true
truncate
trusted
type
types
uescape
unbounded
uncommitted
unconditional
under
unencrypted
union
unique
unknown
unlink
unlisten
unlogged
unmatched
unnamed
unnest
until
untyped
update
upper
uri
usage
user
user_defined_type_catalog
user_defined_type_code
user_defined_type_name
user_defined_type_schema
using
utf16
utf32
utf8
vacuum
valid
validate
validator
value
value_of
values
var_pop
var_samp
varbinary
varchar
variadic
varying
verbose
version
versioning
view
views
volatile
when
whenever
where
whitespace
width_bucket
window
with
within
without
work
wrapper
write
xml
xmlagg
xmlattributes
xmlbinary
xmlcast
xmlcomment
xmlconcat
xmldeclaration
xmldocument
xmlelement
xmlexists
xmlforest
xmliterate
xmlnamespaces
xmlparse
xmlpi
xmlquery
xmlroot
xmlschema
xmlserialize
xmltable
xmltext
xmlvalidate
year
yes
zone
Client Modification Feature
Name
Supported
Defined By
BasePath
✗
ToolingExtension
Authorizations
✗
ToolingExtension
UserAgent
✗
ToolingExtension
MockServer
✗
ToolingExtension
Name
Supported
Defined By
Custom
✗
OAS2,OAS3
Int32
✓
OAS2,OAS3
Int64
✓
OAS2,OAS3
Float
✓
OAS2,OAS3
Double
✓
OAS2,OAS3
Decimal
✓
ToolingExtension
String
✓
OAS2,OAS3
Byte
✓
OAS2,OAS3
Binary
✓
OAS2,OAS3
Boolean
✓
OAS2,OAS3
Date
✓
OAS2,OAS3
DateTime
✓
OAS2,OAS3
Password
✓
OAS2,OAS3
File
✓
OAS2
Uuid
✗
Array
✓
OAS2,OAS3
Null
✗
OAS3
AnyType
✗
OAS2,OAS3
Object
✓
OAS2,OAS3
Maps
✓
ToolingExtension
CollectionFormat
✓
OAS2
CollectionFormatMulti
✓
OAS2
Enum
✓
OAS2,OAS3
ArrayOfEnum
✓
ToolingExtension
ArrayOfModel
✓
ToolingExtension
ArrayOfCollectionOfPrimitives
✓
ToolingExtension
ArrayOfCollectionOfModel
✓
ToolingExtension
ArrayOfCollectionOfEnum
✓
ToolingExtension
MapOfEnum
✓
ToolingExtension
MapOfModel
✓
ToolingExtension
MapOfCollectionOfPrimitives
✓
ToolingExtension
MapOfCollectionOfModel
✓
ToolingExtension
MapOfCollectionOfEnum
✓
ToolingExtension
Name
Supported
Defined By
Readme
✓
ToolingExtension
Model
✓
ToolingExtension
Api
✓
ToolingExtension
Name
Supported
Defined By
Host
✓
OAS2,OAS3
BasePath
✓
OAS2,OAS3
Info
✓
OAS2,OAS3
Schemes
✗
OAS2,OAS3
PartialSchemes
✓
OAS2,OAS3
Consumes
✓
OAS2
Produces
✓
OAS2
ExternalDocumentation
✓
OAS2,OAS3
Examples
✓
OAS2,OAS3
XMLStructureDefinitions
✗
OAS2,OAS3
MultiServer
✗
OAS3
ParameterizedServer
✗
OAS3
ParameterStyling
✗
OAS3
Callbacks
✗
OAS3
LinkObjects
✗
OAS3
Name
Supported
Defined By
Path
✓
OAS2,OAS3
Query
✓
OAS2,OAS3
Header
✓
OAS2,OAS3
Body
✓
OAS2
FormUnencoded
✓
OAS2
FormMultipart
✓
OAS2
Cookie
✓
OAS3
Name
Supported
Defined By
Simple
✓
OAS2,OAS3
Composite
✓
OAS2,OAS3
Polymorphism
✗
OAS2,OAS3
Union
✗
OAS3
allOf
✗
OAS2,OAS3
anyOf
✗
OAS3
oneOf
✗
OAS3
not
✗
OAS3
Name
Supported
Defined By
BasicAuth
✗
OAS2,OAS3
ApiKey
✗
OAS2,OAS3
OpenIDConnect
✗
OAS3
BearerToken
✗
OAS3
OAuth2_Implicit
✗
OAS2,OAS3
OAuth2_Password
✗
OAS2,OAS3
OAuth2_ClientCredentials
✗
OAS2,OAS3
OAuth2_AuthorizationCode
✗
OAS2,OAS3
SignatureAuth
✗
OAS3
AWSV4Signature
✗
ToolingExtension
Name
Supported
Defined By
JSON
✗
OAS2,OAS3
XML
✗
OAS2,OAS3
PROTOBUF
✗
ToolingExtension
Custom
✗
OAS2,OAS3