diff --git a/00163030.34ba4610.js b/00163030.34ba4610.js deleted file mode 100644 index d868d2a59a5..00000000000 --- a/00163030.34ba4610.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{130:function(t,e,a){"use strict";a.r(e),a.d(e,"frontMatter",(function(){return r})),a.d(e,"metadata",(function(){return c})),a.d(e,"rightToc",(function(){return O})),a.d(e,"default",(function(){return i}));var n=a(1),b=a(9),l=(a(0),a(312)),r={title:"Documentation for the dart-dio-next Generator"},c={id:"generators/dart-dio-next",title:"Documentation for the dart-dio-next Generator",description:"## METADATA",source:"@site/../docs/generators/dart-dio-next.md",permalink:"/docs/generators/dart-dio-next",editUrl:"https://github.com/OpenAPITools/openapi-generator/edit/master/website/../docs/generators/dart-dio-next.md",lastUpdatedBy:"Justin Black",lastUpdatedAt:1650213369},O=[{value:"METADATA",id:"metadata",children:[]},{value:"CONFIG OPTIONS",id:"config-options",children:[]},{value:"IMPORT MAPPING",id:"import-mapping",children:[]},{value:"INSTANTIATION TYPES",id:"instantiation-types",children:[]},{value:"LANGUAGE PRIMITIVES",id:"language-primitives",children:[]},{value:"RESERVED WORDS",id:"reserved-words",children:[]},{value:"FEATURE SET",id:"feature-set",children:[{value:"Client Modification Feature",id:"client-modification-feature",children:[]},{value:"Data Type Feature",id:"data-type-feature",children:[]},{value:"Documentation Feature",id:"documentation-feature",children:[]},{value:"Global Feature",id:"global-feature",children:[]},{value:"Parameter Feature",id:"parameter-feature",children:[]},{value:"Schema Support Feature",id:"schema-support-feature",children:[]},{value:"Security Feature",id:"security-feature",children:[]},{value:"Wire Format Feature",id:"wire-format-feature",children:[]}]}],j={rightToc:O};function i(t){var e=t.components,a=Object(b.a)(t,["components"]);return Object(l.b)("wrapper",Object(n.a)({},j,a,{components:e,mdxType:"MDXLayout"}),Object(l.b)("h2",{id:"metadata"},"METADATA"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Property"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Value"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Notes"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"generator name"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"dart-dio-next"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pass this to the generate command after -g")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"generator stability"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"EXPERIMENTAL"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"generator type"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CLIENT"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"generator language"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Dart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"generator default templating engine"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"mustache"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"helpTxt"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Generates a Dart Dio client library with null-safety."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))))),Object(l.b)("h2",{id:"config-options"},"CONFIG OPTIONS"),Object(l.b)("p",null,"These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/configuration"}),"configuration docs")," for more details."),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Option"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Values"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Default"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"allowUnicodeIdentifiers"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"boolean, toggles whether unicode identifiers are allowed in names or not, default is false"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"dateLibrary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Specify Date library"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("dl",null,Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"core")),Object(l.b)("dd",null,"[DEFAULT]"," Dart core library (DateTime)"),Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"timemachine")),Object(l.b)("dd",null,"Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing."))),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"core")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"disallowAdditionalPropertiesIfNotPresent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("dl",null,Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"false")),Object(l.b)("dd",null,"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications."),Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"true")),Object(l.b)("dd",null,"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default."))),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ensureUniqueParams"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Whether to ensure parameter names are unique in an operation (rename parameters that are not)."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"enumUnknownDefaultCase"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("dl",null,Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"false")),Object(l.b)("dd",null,"No changes to the enum's are made, this is the default option."),Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"true")),Object(l.b)("dd",null,"With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case."))),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"legacyDiscriminatorBehavior"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default)."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("dl",null,Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"true")),Object(l.b)("dd",null,"The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document."),Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"false")),Object(l.b)("dd",null,"The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing."))),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"prependFormOrBodyParameters"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Add form or body parameters to the beginning of the parameter list."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubAuthor"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Author name in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Author")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubAuthorEmail"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Email address of the author in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"author@homepage")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubDescription"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Description in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenAPI API client")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubHomepage"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Homepage in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"homepage")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubLibrary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Library name in generated code"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"openapi.api")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubName"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Name in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"openapi")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pubVersion"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Version in generated pubspec"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"1.0.0")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"serializationLibrary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Specify serialization library"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("dl",null,Object(l.b)("dt",null,Object(l.b)("strong",{parentName:"td"},"built_value")),Object(l.b)("dd",null,"[DEFAULT]"," built_value"))),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"built_value")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"sortModelPropertiesByRequiredFlag"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Sort model properties to place required parameters before optional parameters."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"sortParamsByRequiredFlag"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Sort method arguments to place required parameters before optional parameters."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"sourceFolder"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"source folder for generated code"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"src")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"useEnumExtension"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Allow the 'x-enum-values' extension for enums"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")))),Object(l.b)("h2",{id:"import-mapping"},"IMPORT MAPPING"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Imports"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"instantiation-types"},"INSTANTIATION TYPES"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Instantiated By"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"language-primitives"},"LANGUAGE PRIMITIVES"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"String"),Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"double"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"num")),Object(l.b)("h2",{id:"reserved-words"},"RESERVED WORDS"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"abstract"),Object(l.b)("li",null,"as"),Object(l.b)("li",null,"assert"),Object(l.b)("li",null,"async"),Object(l.b)("li",null,"await"),Object(l.b)("li",null,"break"),Object(l.b)("li",null,"case"),Object(l.b)("li",null,"catch"),Object(l.b)("li",null,"class"),Object(l.b)("li",null,"const"),Object(l.b)("li",null,"continue"),Object(l.b)("li",null,"covariant"),Object(l.b)("li",null,"default"),Object(l.b)("li",null,"deferred"),Object(l.b)("li",null,"do"),Object(l.b)("li",null,"dynamic"),Object(l.b)("li",null,"else"),Object(l.b)("li",null,"enum"),Object(l.b)("li",null,"export"),Object(l.b)("li",null,"extends"),Object(l.b)("li",null,"extension"),Object(l.b)("li",null,"external"),Object(l.b)("li",null,"factory"),Object(l.b)("li",null,"false"),Object(l.b)("li",null,"final"),Object(l.b)("li",null,"finally"),Object(l.b)("li",null,"for"),Object(l.b)("li",null,"function"),Object(l.b)("li",null,"get"),Object(l.b)("li",null,"hide"),Object(l.b)("li",null,"if"),Object(l.b)("li",null,"implements"),Object(l.b)("li",null,"import"),Object(l.b)("li",null,"in"),Object(l.b)("li",null,"inout"),Object(l.b)("li",null,"interface"),Object(l.b)("li",null,"is"),Object(l.b)("li",null,"late"),Object(l.b)("li",null,"library"),Object(l.b)("li",null,"mixin"),Object(l.b)("li",null,"native"),Object(l.b)("li",null,"new"),Object(l.b)("li",null,"null"),Object(l.b)("li",null,"of"),Object(l.b)("li",null,"on"),Object(l.b)("li",null,"operator"),Object(l.b)("li",null,"out"),Object(l.b)("li",null,"part"),Object(l.b)("li",null,"patch"),Object(l.b)("li",null,"required"),Object(l.b)("li",null,"rethrow"),Object(l.b)("li",null,"return"),Object(l.b)("li",null,"set"),Object(l.b)("li",null,"show"),Object(l.b)("li",null,"source"),Object(l.b)("li",null,"static"),Object(l.b)("li",null,"super"),Object(l.b)("li",null,"switch"),Object(l.b)("li",null,"sync"),Object(l.b)("li",null,"this"),Object(l.b)("li",null,"throw"),Object(l.b)("li",null,"true"),Object(l.b)("li",null,"try"),Object(l.b)("li",null,"typedef"),Object(l.b)("li",null,"var"),Object(l.b)("li",null,"void"),Object(l.b)("li",null,"while"),Object(l.b)("li",null,"with"),Object(l.b)("li",null,"yield")),Object(l.b)("h2",{id:"feature-set"},"FEATURE SET"),Object(l.b)("h3",{id:"client-modification-feature"},"Client Modification Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Authorizations"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"UserAgent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MockServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"data-type-feature"},"Data Type Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int32"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int64"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Float"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Double"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Decimal"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"String"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Byte"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Binary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Boolean"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Date"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"DateTime"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"File"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Uuid"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Array"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Null"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"AnyType"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Object"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Maps"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormat"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormatMulti"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Enum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"documentation-feature"},"Documentation Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Readme"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Model"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Api"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"global-feature"},"Global Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Host"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Info"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Schemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PartialSchemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Consumes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Produces"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ExternalDocumentation"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Examples"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XMLStructureDefinitions"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MultiServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterizedServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterStyling"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Callbacks"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"LinkObjects"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"parameter-feature"},"Parameter Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Path"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Query"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Header"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Body"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormUnencoded"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormMultipart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Cookie"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"schema-support-feature"},"Schema Support Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Simple"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Composite"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Polymorphism"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Union"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"allOf"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"anyOf"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"oneOf"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"not"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"security-feature"},"Security Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasicAuth"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ApiKey"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenIDConnect"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BearerToken"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Implicit"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_ClientCredentials"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_AuthorizationCode"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))),Object(l.b)("h3",{id:"wire-format-feature"},"Wire Format Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"JSON"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XML"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PROTOBUF"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))))}i.isMDXComponent=!0},312:function(t,e,a){"use strict";a.d(e,"a",(function(){return d})),a.d(e,"b",(function(){return m}));var n=a(0),b=a.n(n);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},d=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},p={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},u=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),d=i(a),u=n,m=d["".concat(r,".").concat(u)]||d[u]||p[u]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=u;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},d=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},p={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},u=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),d=i(a),u=n,m=d["".concat(r,".").concat(u)]||d[u]||p[u]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=u;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),c=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):r({},n,{},e)),t},u=function(e){var n=c(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},m=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(t),m=o,g=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return t?i.a.createElement(g,r({ref:n},p,{components:t})):i.a.createElement(g,r({ref:n},p))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,l=new Array(a);l[0]=m;var r={};for(var s in n)hasOwnProperty.call(n,s)&&(r[s]=n[s]);r.originalType=e,r.mdxType="string"==typeof e?e:o,l[1]=r;for(var p=2;p=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),c=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):r({},n,{},e)),t},u=function(e){var n=c(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},m=Object(o.forwardRef)((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(t),m=o,g=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return t?i.a.createElement(g,r({ref:n},p,{components:t})):i.a.createElement(g,r({ref:n},p))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,l=new Array(a);l[0]=m;var r={};for(var s in n)hasOwnProperty.call(n,s)&&(r[s]=n[s]);r.originalType=e,r.mdxType="string"==typeof e?e:o,l[1]=r;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=o.a.createContext({}),s=function(e){var t=o.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=s(e.components);return o.a.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,p=e.parentName,i=l(e,["components","mdxType","originalType","parentName"]),b=s(n),d=a,m=b["".concat(p,".").concat(d)]||b[d]||u[d]||r;return n?o.a.createElement(m,c({ref:t},i,{components:n})):o.a.createElement(m,c({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,p=new Array(r);p[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,p[1]=c;for(var i=2;i=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=o.a.createContext({}),s=function(e){var t=o.a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=s(e.components);return o.a.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,p=e.parentName,i=l(e,["components","mdxType","originalType","parentName"]),b=s(n),d=a,m=b["".concat(p,".").concat(d)]||b[d]||u[d]||r;return n?o.a.createElement(m,c({ref:t},i,{components:n})):o.a.createElement(m,c({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,p=new Array(r);p[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,p[1]=c;for(var i=2;i\n## Documentation for API Endpoints\n\nAll URIs are relative to *{{{basePath}}}*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}\n{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}\n{{/generateApiDocs}}\n\n{{#generateModelDocs}}\n\n## Documentation for Models\n\n{{#modelPackage}}\n{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md)\n{{/model}}{{/models}}\n{{/modelPackage}}\n{{^modelPackage}}\nNo model defined in this package\n{{/modelPackage}}\n{{/generateModelDocs}}\n\n{{! TODO: optional documentation for authorization? }}\n## Documentation for Authorization\n\n{{^authMethods}}\nAll endpoints do not require authorization.\n{{/authMethods}}\n{{#authMethods}}\n{{#last}}\nAuthentication schemes defined for the API:\n{{/last}}\n{{/authMethods}}\n{{#authMethods}}\n\n### {{name}}\n\n{{#isApiKey}}- **Type**: API key\n- **API key parameter name**: {{keyParamName}}\n- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}\n{{/isApiKey}}\n{{#isBasic}}- **Type**: HTTP basic authentication\n{{/isBasic}}\n{{#isOAuth}}- **Type**: OAuth\n- **Flow**: {{flow}}\n- **Authorization URL**: {{authorizationUrl}}\n- **Scopes**: {{^scopes}}N/A{{/scopes}}\n{{#scopes}} - {{scope}}: {{description}}\n{{/scopes}}\n{{/isOAuth}}\n\n{{/authMethods}}\n')),Object(o.b)("p",null,"Let's not focus too much on the contents of this file. You may refer to ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/templating"}),"templating")," for more details on the variables bound to these files and to ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/debugging"}),"debugging"),' how to debug the structures. Of note here is that we\'re generating structures in markdown as defined by the objects constructed by our new "Config" class.'),Object(o.b)("h4",{id:"apimustache"},"api.mustache"),Object(o.b)("p",null,"The API documentation might look like this:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),'# {{classname}}{{#description}}\n{{description}}{{/description}}\n\nAll URIs are relative to *{{basePath}}*\n\nMethod | HTTP request | Description\n------------- | ------------- | -------------\n{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}\n{{/operation}}{{/operations}}\n\n{{#operations}}\n{{#operation}}\n\n# **{{operationId}}**\n> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})\n\n{{summary}}{{#notes}}\n\n{{notes}}{{/notes}}\n\n### Parameters\n{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}\n{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}\n{{/allParams}}\n\n### Return type\n\n{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}\n\n### Authorization\n\n{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}\n\n### HTTP request headers\n\n - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}\n - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}\n\n{{/operation}}\n{{/operations}}\n\n')),Object(o.b)("h4",{id:"modelmustache"},"model.mustache"),Object(o.b)("p",null,"The models file could resemble the following."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#models}}\n{{#model}}\n# {{{packageName}}}.{{modelPackage}}.{{{classname}}}\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n{{#parent}}\n{{#parentVars}}\n**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}\n{{/parentVars}}\n{{/parent}}\n{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}\n{{/vars}}\n\n[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)\n\n{{/model}}\n{{/models}}\n")),Object(o.b)("h3",{id:"build-it"},"Build it"),Object(o.b)("p",null,"To compile quickly to test this out, you can run ",Object(o.b)("inlineCode",{parentName:"p"},"mvn clean package -DskipTests"),"."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"When implementing a more robust generator, you'll want to run all tests as well: ",Object(o.b)("inlineCode",{parentName:"p"},"mvn clean package"))),Object(o.b)("h3",{id:"compile-sample"},"Compile Sample"),Object(o.b)("p",null,"The ",Object(o.b)("inlineCode",{parentName:"p"},"new.sh")," script created the generation config file ",Object(o.b)("inlineCode",{parentName:"p"},"bin/configs/common-mark-documentation-petstore-new.yaml"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'generatorName: common-mark\noutputDir: samples/documentation/petstore/common/mark\ninputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml\ntemplateDir: modules/openapi-generator/src/main/resources/common-mark\nadditionalProperties:\n hideGenerationTimestamp: "true"\n')),Object(o.b)("p",null,"This configuration file is passed to the generator's CLI tool during continuous integration builds, and many outputs are compiled and tested as a regression test on every build. Contributors are also asked to run ",Object(o.b)("inlineCode",{parentName:"p"},"./bin/utils/ensure-up-to-date")," before opening a pull request to regenerate all samples defined under ",Object(o.b)("inlineCode",{parentName:"p"},"./bin/configs"),". This allows maintainers to quickly verify whether changes impact other generators."),Object(o.b)("p",null,"Configuration based examples allow us to test the same samples in each tooling option (CLI, Gradle Plugin, Maven Plugin, etc.). "),Object(o.b)("p",null,"You can compile your generator by running:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"./bin/generate-samples.sh bin/configs/common-mark-documentation-petstore-new.yaml\n")),Object(o.b)("p",null,"This configuration file can be used to demonstrate the default options for generation. A common option in most of these configs is to define the template directory as the generator's directory under ",Object(o.b)("inlineCode",{parentName:"p"},"resources"),". This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a ",Object(o.b)("inlineCode",{parentName:"p"},"CliOption"),")."),Object(o.b)("h3",{id:"verify-output"},"Verify output"),Object(o.b)("p",null,"Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works."),Object(o.b)("p",null,"For markdown, you can open in Visual Studio Code or any other editor with a markdown preview. Not all editors support relative links to other markdown documents. To test the output in this guide, install ",Object(o.b)("inlineCode",{parentName:"p"},"markserv"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"npm install --global markserv\n")),Object(o.b)("p",null,"Now, you can serve the output directory directly and test your links:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"markserv samples/documentation/petstore/common/markdown\n")),Object(o.b)("p",null,"That's it! You've created your first generator!"))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return b}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s({},t,{},e)),n},m=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=c(n),u=a,b=m["".concat(i,".").concat(u)]||m[u]||d[u]||o;return n?r.a.createElement(b,s({ref:t},p,{components:n})):r.a.createElement(b,s({ref:t},p))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var p=2;p\n## Documentation for API Endpoints\n\nAll URIs are relative to *{{{basePath}}}*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}\n{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}\n{{/generateApiDocs}}\n\n{{#generateModelDocs}}\n\n## Documentation for Models\n\n{{#modelPackage}}\n{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md)\n{{/model}}{{/models}}\n{{/modelPackage}}\n{{^modelPackage}}\nNo model defined in this package\n{{/modelPackage}}\n{{/generateModelDocs}}\n\n{{! TODO: optional documentation for authorization? }}\n## Documentation for Authorization\n\n{{^authMethods}}\nAll endpoints do not require authorization.\n{{/authMethods}}\n{{#authMethods}}\n{{#last}}\nAuthentication schemes defined for the API:\n{{/last}}\n{{/authMethods}}\n{{#authMethods}}\n\n### {{name}}\n\n{{#isApiKey}}- **Type**: API key\n- **API key parameter name**: {{keyParamName}}\n- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}\n{{/isApiKey}}\n{{#isBasic}}- **Type**: HTTP basic authentication\n{{/isBasic}}\n{{#isOAuth}}- **Type**: OAuth\n- **Flow**: {{flow}}\n- **Authorization URL**: {{authorizationUrl}}\n- **Scopes**: {{^scopes}}N/A{{/scopes}}\n{{#scopes}} - {{scope}}: {{description}}\n{{/scopes}}\n{{/isOAuth}}\n\n{{/authMethods}}\n')),Object(o.b)("p",null,"Let's not focus too much on the contents of this file. You may refer to ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/templating"}),"templating")," for more details on the variables bound to these files and to ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/debugging"}),"debugging"),' how to debug the structures. Of note here is that we\'re generating structures in markdown as defined by the objects constructed by our new "Config" class.'),Object(o.b)("h4",{id:"apimustache"},"api.mustache"),Object(o.b)("p",null,"The API documentation might look like this:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),'# {{classname}}{{#description}}\n{{description}}{{/description}}\n\nAll URIs are relative to *{{basePath}}*\n\nMethod | HTTP request | Description\n------------- | ------------- | -------------\n{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}\n{{/operation}}{{/operations}}\n\n{{#operations}}\n{{#operation}}\n\n# **{{operationId}}**\n> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})\n\n{{summary}}{{#notes}}\n\n{{notes}}{{/notes}}\n\n### Parameters\n{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}\nName | Type | Description | Notes\n------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}\n{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}\n{{/allParams}}\n\n### Return type\n\n{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}\n\n### Authorization\n\n{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}\n\n### HTTP request headers\n\n - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}\n - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}\n\n{{/operation}}\n{{/operations}}\n\n')),Object(o.b)("h4",{id:"modelmustache"},"model.mustache"),Object(o.b)("p",null,"The models file could resemble the following."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#models}}\n{{#model}}\n# {{{packageName}}}.{{modelPackage}}.{{{classname}}}\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n{{#parent}}\n{{#parentVars}}\n**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}\n{{/parentVars}}\n{{/parent}}\n{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}\n{{/vars}}\n\n[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)\n\n{{/model}}\n{{/models}}\n")),Object(o.b)("h3",{id:"build-it"},"Build it"),Object(o.b)("p",null,"To compile quickly to test this out, you can run ",Object(o.b)("inlineCode",{parentName:"p"},"mvn clean package -DskipTests"),"."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"When implementing a more robust generator, you'll want to run all tests as well: ",Object(o.b)("inlineCode",{parentName:"p"},"mvn clean package"))),Object(o.b)("h3",{id:"compile-sample"},"Compile Sample"),Object(o.b)("p",null,"The ",Object(o.b)("inlineCode",{parentName:"p"},"new.sh")," script created the generation config file ",Object(o.b)("inlineCode",{parentName:"p"},"bin/configs/common-mark-documentation-petstore-new.yaml"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),'generatorName: common-mark\noutputDir: samples/documentation/petstore/common/mark\ninputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml\ntemplateDir: modules/openapi-generator/src/main/resources/common-mark\nadditionalProperties:\n hideGenerationTimestamp: "true"\n')),Object(o.b)("p",null,"This configuration file is passed to the generator's CLI tool during continuous integration builds, and many outputs are compiled and tested as a regression test on every build. Contributors are also asked to run ",Object(o.b)("inlineCode",{parentName:"p"},"./bin/utils/ensure-up-to-date")," before opening a pull request to regenerate all samples defined under ",Object(o.b)("inlineCode",{parentName:"p"},"./bin/configs"),". This allows maintainers to quickly verify whether changes impact other generators."),Object(o.b)("p",null,"Configuration based examples allow us to test the same samples in each tooling option (CLI, Gradle Plugin, Maven Plugin, etc.). "),Object(o.b)("p",null,"You can compile your generator by running:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"./bin/generate-samples.sh bin/configs/common-mark-documentation-petstore-new.yaml\n")),Object(o.b)("p",null,"This configuration file can be used to demonstrate the default options for generation. A common option in most of these configs is to define the template directory as the generator's directory under ",Object(o.b)("inlineCode",{parentName:"p"},"resources"),". This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a ",Object(o.b)("inlineCode",{parentName:"p"},"CliOption"),")."),Object(o.b)("h3",{id:"verify-output"},"Verify output"),Object(o.b)("p",null,"Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works."),Object(o.b)("p",null,"For markdown, you can open in Visual Studio Code or any other editor with a markdown preview. Not all editors support relative links to other markdown documents. To test the output in this guide, install ",Object(o.b)("inlineCode",{parentName:"p"},"markserv"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"npm install --global markserv\n")),Object(o.b)("p",null,"Now, you can serve the output directory directly and test your links:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"markserv samples/documentation/petstore/common/markdown\n")),Object(o.b)("p",null,"That's it! You've created your first generator!"))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return b}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s({},t,{},e)),n},m=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=c(n),u=a,b=m["".concat(i,".").concat(u)]||m[u]||d[u]||o;return n?r.a.createElement(b,s({ref:t},p,{components:n})):r.a.createElement(b,s({ref:t},p))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var p=2;p use Swagger core v3 (see ",Object(o.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/OpenAPITools/openapi-generator/issues/27%5B#27%5D"}),"https://github.com/OpenAPITools/openapi-generator/issues/27[#27]"),")"))),Object(o.b)("li",{parentName:"ul"},"Documentation"),Object(o.b)("li",{parentName:"ul"},"Static pages, preferably on gh-pages, devoted to each generator"),Object(o.b)("li",{parentName:"ul"},"Explain generator options"),Object(o.b)("li",{parentName:"ul"},"Centralized docs on generated code usage/examples/configuration")),Object(o.b)("h2",{id:"medium-term"},"Medium-term"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"Feature set, well-defined API (code and templates), and extensibility improvements.")),Object(o.b)("h3",{id:"api"},"API"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective."),Object(o.b)("li",{parentName:"ul"},"Feature set (potential generators to add; not an exhaustive list)",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Azure functions (node.js, server)"),Object(o.b)("li",{parentName:"ul"},"Finagle HTTP Client (Scala, client)"),Object(o.b)("li",{parentName:"ul"},"Finagle Http Server (Scala, server)"),Object(o.b)("li",{parentName:"ul"},"Finatra (Scala, server)"),Object(o.b)("li",{parentName:"ul"},"Kotlin Spring MVC/Springboot (server)"),Object(o.b)("li",{parentName:"ul"},"C++ Server, any framework (server)")))),Object(o.b)("h3",{id:"general"},"General"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Migrate from Maven to Gradle"),Object(o.b)("li",{parentName:"ul"},"Java 9+ support"),Object(o.b)("li",{parentName:"ul"},"Feature set (other options to investigate)"),Object(o.b)("li",{parentName:"ul"},"SPI plugins",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Templating engine"),Object(o.b)("li",{parentName:"ul"},"Language extensions"),Object(o.b)("li",{parentName:"ul"},"Custom extensions (e.g. allowing users to load support for ",Object(o.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/Azure/azure-rest-api-specs"}),"azure-rest-api-specs"),")"))),Object(o.b)("li",{parentName:"ul"},"Customizable templating engines (handlebars support)"),Object(o.b)("li",{parentName:"ul"},"Unit-testing templates (to previously mentioned explicit type as an interface to the template)"),Object(o.b)("li",{parentName:"ul"},"Reduce coupling"),Object(o.b)("li",{parentName:"ul"},"Make types extending ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," become the generation entrypoint"),Object(o.b)("li",{parentName:"ul"},"Allow current ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," types to define templating engine"),Object(o.b)("li",{parentName:"ul"},"Allow current ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," types to modify workflow (currently encapsulated in ",Object(o.b)("inlineCode",{parentName:"li"},"DefaultGenerator")," and tightly coupled to the template engine"),Object(o.b)("li",{parentName:"ul"},'Clearer reuse of "language" features, outside of "generator" types. That is, rather than enforcing polymorphic sharing of "language" which currently allows the super type to redefine framework-specific mapping functionality, generators could compose one or more language support types.'),Object(o.b)("li",{parentName:"ul"},"Define template deprecation/removal process")),Object(o.b)("h2",{id:"long-term"},"Long-term"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"Expanding tooling offered, integrations, potentially SaaS offering to partially fund efforts.")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Generator UI wrappers",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Move jimschubert/intellij-swagger-codegen plugin under the org, and rename"),Object(o.b)("li",{parentName:"ul"},"Look into an Eclipse UI wrapper around the generator"),Object(o.b)("li",{parentName:"ul"},"Look at Visual Studio Code (and/or Atom, sublime text) integration"))),Object(o.b)("li",{parentName:"ul"},"Provide a native GUI for viewing/editing specs. Most tools are currently geared toward developers, but often times it may be non-technical business users who are interested in an API."),Object(o.b)("li",{parentName:"ul"},"A paid service (SaaS) for generation may be enticing for some users. Such a service would allow for statistics (mentioned earlier in telemetry)"),Object(o.b)("li",{parentName:"ul"},"Additional tools"),Object(o.b)("li",{parentName:"ul"},"node.js build system(s) integration (grunt/gulp/webpack/etc)"),Object(o.b)("li",{parentName:"ul"},"ruby gem"),Object(o.b)("li",{parentName:"ul"},"others (which may require previously mentioned SaaS API)")))}u.isMDXComponent=!0},312:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),u=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},s=function(e){var t=u(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(r),m=n,d=s["".concat(i,".").concat(m)]||s[m]||b[m]||o;return r?a.a.createElement(d,l({ref:t},p,{components:r})):a.a.createElement(d,l({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p use Swagger core v3 (see ",Object(o.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/OpenAPITools/openapi-generator/issues/27%5B#27%5D"}),"https://github.com/OpenAPITools/openapi-generator/issues/27[#27]"),")"))),Object(o.b)("li",{parentName:"ul"},"Documentation"),Object(o.b)("li",{parentName:"ul"},"Static pages, preferably on gh-pages, devoted to each generator"),Object(o.b)("li",{parentName:"ul"},"Explain generator options"),Object(o.b)("li",{parentName:"ul"},"Centralized docs on generated code usage/examples/configuration")),Object(o.b)("h2",{id:"medium-term"},"Medium-term"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"Feature set, well-defined API (code and templates), and extensibility improvements.")),Object(o.b)("h3",{id:"api"},"API"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective."),Object(o.b)("li",{parentName:"ul"},"Feature set (potential generators to add; not an exhaustive list)",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Azure functions (node.js, server)"),Object(o.b)("li",{parentName:"ul"},"Finagle HTTP Client (Scala, client)"),Object(o.b)("li",{parentName:"ul"},"Finagle Http Server (Scala, server)"),Object(o.b)("li",{parentName:"ul"},"Finatra (Scala, server)"),Object(o.b)("li",{parentName:"ul"},"Kotlin Spring MVC/Springboot (server)"),Object(o.b)("li",{parentName:"ul"},"C++ Server, any framework (server)")))),Object(o.b)("h3",{id:"general"},"General"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Migrate from Maven to Gradle"),Object(o.b)("li",{parentName:"ul"},"Java 9+ support"),Object(o.b)("li",{parentName:"ul"},"Feature set (other options to investigate)"),Object(o.b)("li",{parentName:"ul"},"SPI plugins",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Templating engine"),Object(o.b)("li",{parentName:"ul"},"Language extensions"),Object(o.b)("li",{parentName:"ul"},"Custom extensions (e.g. allowing users to load support for ",Object(o.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/Azure/azure-rest-api-specs"}),"azure-rest-api-specs"),")"))),Object(o.b)("li",{parentName:"ul"},"Customizable templating engines (handlebars support)"),Object(o.b)("li",{parentName:"ul"},"Unit-testing templates (to previously mentioned explicit type as an interface to the template)"),Object(o.b)("li",{parentName:"ul"},"Reduce coupling"),Object(o.b)("li",{parentName:"ul"},"Make types extending ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," become the generation entrypoint"),Object(o.b)("li",{parentName:"ul"},"Allow current ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," types to define templating engine"),Object(o.b)("li",{parentName:"ul"},"Allow current ",Object(o.b)("inlineCode",{parentName:"li"},"CodegenConfig")," types to modify workflow (currently encapsulated in ",Object(o.b)("inlineCode",{parentName:"li"},"DefaultGenerator")," and tightly coupled to the template engine"),Object(o.b)("li",{parentName:"ul"},'Clearer reuse of "language" features, outside of "generator" types. That is, rather than enforcing polymorphic sharing of "language" which currently allows the super type to redefine framework-specific mapping functionality, generators could compose one or more language support types.'),Object(o.b)("li",{parentName:"ul"},"Define template deprecation/removal process")),Object(o.b)("h2",{id:"long-term"},"Long-term"),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"Expanding tooling offered, integrations, potentially SaaS offering to partially fund efforts.")),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Generator UI wrappers",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"Move jimschubert/intellij-swagger-codegen plugin under the org, and rename"),Object(o.b)("li",{parentName:"ul"},"Look into an Eclipse UI wrapper around the generator"),Object(o.b)("li",{parentName:"ul"},"Look at Visual Studio Code (and/or Atom, sublime text) integration"))),Object(o.b)("li",{parentName:"ul"},"Provide a native GUI for viewing/editing specs. Most tools are currently geared toward developers, but often times it may be non-technical business users who are interested in an API."),Object(o.b)("li",{parentName:"ul"},"A paid service (SaaS) for generation may be enticing for some users. Such a service would allow for statistics (mentioned earlier in telemetry)"),Object(o.b)("li",{parentName:"ul"},"Additional tools"),Object(o.b)("li",{parentName:"ul"},"node.js build system(s) integration (grunt/gulp/webpack/etc)"),Object(o.b)("li",{parentName:"ul"},"ruby gem"),Object(o.b)("li",{parentName:"ul"},"others (which may require previously mentioned SaaS API)")))}u.isMDXComponent=!0},312:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return d}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=a.a.createContext({}),u=function(e){var t=a.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},s=function(e){var t=u(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),s=u(r),m=n,d=s["".concat(i,".").concat(m)]||s[m]||b[m]||o;return r?a.a.createElement(d,l({ref:t},p,{components:r})):a.a.createElement(d,l({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p")," and ",Object(i.b)("inlineCode",{parentName:"p"},"")," are treated the same as if the ",Object(i.b)("inlineCode",{parentName:"p"},"apis"),' node was undefined; there\'s no way to provide an empty string as a default. Instead, we have to extract the global property into its own properties which maintain the two states supported elsewhere (i.e. "all apis" or "select apis"). We have ',Object(i.b)("inlineCode",{parentName:"p"},"generateApis")," which accepts a boolean and ",Object(i.b)("inlineCode",{parentName:"p"},"apisToGenerate")," which accepts a comma-separated selection list."),Object(i.b)("h2",{id:"discovering-options"},"Discovering Options"),Object(i.b)("p",null,"Refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/globals"}),"global properties")," for a list of available global properties and their usage."),Object(i.b)("p",null,"Top-level tooling options are defined in ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/usage/#generate"}),"CLI usage"),". Many of these options directly map to camel case options in other tools, but do refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/plugins"}),"plugin documentation")," for full details or plugin-specific differences."),Object(i.b)("p",null,"Config options for generators are available in ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/generators"}),"documentation online"),". You may also use the CLI to query config options for a target generator using ",Object(i.b)("inlineCode",{parentName:"p"},"openapi-generator config-help -g "),". For example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"$ openapi-generator config-help -g mysql-schema\n\nCONFIG OPTIONS\n\n defaultDatabaseName\n Default database name for all MySQL queries (Default: )\n\n identifierNamingConvention\n Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option (Default: original)\n original - Do not transform original names\n snake_case - Use snake_case names\n\n jsonDataTypeEnabled\n Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true)\n\n namedParametersEnabled\n Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled. (Default: false)\n")),Object(i.b)("p",null,"This output provides the name of the configuration option. A set of acceptable values for any constrained values will print as an indented list (e.g. ",Object(i.b)("inlineCode",{parentName:"p"},"identifierNamingConvention")," above)."),Object(i.b)("p",null,"Suppose you want to apply snake case naming to mysql schema outputs. Your configuration might resemble the following examples."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"CLI")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case\n")),Object(i.b)("p",null,"It may seem like a typo but there are two ",Object(i.b)("inlineCode",{parentName:"p"},"=")," signs in the above example."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Maven Plugin")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"\n mysql-schema\n generate-sources\n \n generate\n \n \n spec.yaml\n mysql-schema\n \n snake_case\n \n ${project.build.directory}/generated-sources/mysql\n \n\n")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Gradle Plugin")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),'openApiGenerate {\n generatorName = "mysql-schema"\n inputSpec = "$rootDir/spec.yaml".toString()\n outputDir = "$buildDir/mysql".toString()\n configOptions = [\n identifierNamingConvention: "snake_case"\n ]\n}\n')))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),c=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):p({},t,{},e)),n},b=function(e){var t=c(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=c(n),d=a,m=b["".concat(r,".").concat(d)]||b[d]||u[d]||i;return n?o.a.createElement(m,p({ref:t},s,{components:n})):o.a.createElement(m,p({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=d;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,r[1]=p;for(var s=2;s")," and ",Object(i.b)("inlineCode",{parentName:"p"},"")," are treated the same as if the ",Object(i.b)("inlineCode",{parentName:"p"},"apis"),' node was undefined; there\'s no way to provide an empty string as a default. Instead, we have to extract the global property into its own properties which maintain the two states supported elsewhere (i.e. "all apis" or "select apis"). We have ',Object(i.b)("inlineCode",{parentName:"p"},"generateApis")," which accepts a boolean and ",Object(i.b)("inlineCode",{parentName:"p"},"apisToGenerate")," which accepts a comma-separated selection list."),Object(i.b)("h2",{id:"discovering-options"},"Discovering Options"),Object(i.b)("p",null,"Refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/globals"}),"global properties")," for a list of available global properties and their usage."),Object(i.b)("p",null,"Top-level tooling options are defined in ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/usage/#generate"}),"CLI usage"),". Many of these options directly map to camel case options in other tools, but do refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/plugins"}),"plugin documentation")," for full details or plugin-specific differences."),Object(i.b)("p",null,"Config options for generators are available in ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://openapi-generator.tech/docs/generators"}),"documentation online"),". You may also use the CLI to query config options for a target generator using ",Object(i.b)("inlineCode",{parentName:"p"},"openapi-generator config-help -g "),". For example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"$ openapi-generator config-help -g mysql-schema\n\nCONFIG OPTIONS\n\n defaultDatabaseName\n Default database name for all MySQL queries (Default: )\n\n identifierNamingConvention\n Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option (Default: original)\n original - Do not transform original names\n snake_case - Use snake_case names\n\n jsonDataTypeEnabled\n Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true)\n\n namedParametersEnabled\n Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled. (Default: false)\n")),Object(i.b)("p",null,"This output provides the name of the configuration option. A set of acceptable values for any constrained values will print as an indented list (e.g. ",Object(i.b)("inlineCode",{parentName:"p"},"identifierNamingConvention")," above)."),Object(i.b)("p",null,"Suppose you want to apply snake case naming to mysql schema outputs. Your configuration might resemble the following examples."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"CLI")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case\n")),Object(i.b)("p",null,"It may seem like a typo but there are two ",Object(i.b)("inlineCode",{parentName:"p"},"=")," signs in the above example."),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Maven Plugin")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"\n mysql-schema\n generate-sources\n \n generate\n \n \n spec.yaml\n mysql-schema\n \n snake_case\n \n ${project.build.directory}/generated-sources/mysql\n \n\n")),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Gradle Plugin")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),'openApiGenerate {\n generatorName = "mysql-schema"\n inputSpec = "$rootDir/spec.yaml".toString()\n outputDir = "$buildDir/mysql".toString()\n configOptions = [\n identifierNamingConvention: "snake_case"\n ]\n}\n')))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),c=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):p({},t,{},e)),n},b=function(e){var t=c(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=c(n),d=a,m=b["".concat(r,".").concat(d)]||b[d]||u[d]||i;return n?o.a.createElement(m,p({ref:t},s,{components:n})):o.a.createElement(m,p({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=d;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,r[1]=p;for(var s=2;s=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),s=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,d=u["".concat(a,".").concat(b)]||u[b]||f[b]||i;return n?o.a.createElement(d,c({ref:t},l,{components:n})):o.a.createElement(d,c({ref:t},l))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=b;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var l=2;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),s=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(n),b=r,d=u["".concat(a,".").concat(b)]||u[b]||f[b]||i;return n?o.a.createElement(d,c({ref:t},l,{components:n})):o.a.createElement(d,c({ref:t},l))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=b;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var l=2;l=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=a.a.createContext({}),u=function(e){var t=a.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},d=function(e){var t=u(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=u(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||l[f]||o;return r?a.a.createElement(b,i({ref:t},s,{components:r})):a.a.createElement(b,i({ref:t},s))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var s=2;s=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=a.a.createContext({}),u=function(e){var t=a.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},d=function(e){var t=u(e.components);return a.a.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,c=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=u(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||l[f]||o;return r?a.a.createElement(b,i({ref:t},s,{components:r})):a.a.createElement(b,i({ref:t},s))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var s=2;s - + - + diff --git a/47462ed9.85f8745a.js b/47462ed9.85f8745a.js deleted file mode 100644 index 9243eb1fbe0..00000000000 --- a/47462ed9.85f8745a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{179:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return l})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return s}));var r=n(1),a=n(9),o=(n(0),n(312)),i={id:"file-post-processing",title:"File post-processing"},l={id:"file-post-processing",title:"File post-processing",description:"Each tool (CLI and plugins) supports enabling file post-processing at a high-level. Enabling this option allows for generators which support post-processing to call some external process for each generated file, passing the file path to that tool. The external tool must be defined in an environment variable supported by the generator.",source:"@site/../docs/file-post-processing.md",permalink:"/docs/file-post-processing",editUrl:"https://github.com/OpenAPITools/openapi-generator/edit/master/website/../docs/file-post-processing.md",lastUpdatedBy:"Oleh Kurpiak",lastUpdatedAt:1650097785,sidebar:"docs",previous:{title:"Configuration Options",permalink:"/docs/configuration"},next:{title:"Using Templates",permalink:"/docs/templating"}},p=[{value:"Supported Environment Variables",id:"supported-environment-variables",children:[]},{value:"Example",id:"example",children:[]}],c={rightToc:p};function s(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},c,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Each tool (CLI and plugins) supports enabling file post-processing at a high-level. Enabling this option allows for generators which support post-processing to call some external process for each generated file, passing the file path to that tool. The external tool must be defined in an environment variable supported by the generator."),Object(o.b)("p",null,"Note that:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"this option is ",Object(o.b)("inlineCode",{parentName:"li"},"--enable-post-process-file")," in the CLI and ",Object(o.b)("inlineCode",{parentName:"li"},"enablePostProcessFile")," in plugins"),Object(o.b)("li",{parentName:"ul"},"we require ",Object(o.b)("em",{parentName:"li"},"both")," specifying the environment variable ",Object(o.b)("em",{parentName:"li"},"and")," enabling the option at the tooling level; this feature is opt-in for security "),Object(o.b)("li",{parentName:"ul"},"file processing occurs one at a time"),Object(o.b)("li",{parentName:"ul"},"the external tool may be a custom script which invokes multiple tools")),Object(o.b)("p",null,"Also refer to the relevant documentation for ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"/docs/usage"}),"CLI"),", ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md"}),"Maven Plugin"),", ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc"}),"Gradle Plugin"),", or ",Object(o.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/sbt-openapi-generator/blob/master/README.md"}),"SBT Plugin"),"."),Object(o.b)("h2",{id:"supported-environment-variables"},"Supported Environment Variables"),Object(o.b)("p",null,"The following environment variables are supported by their respective generators:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"CPP_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"CSHARP_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"C_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"DART_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"FSHARP_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"GO_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"HASKELL_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"JAVA_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"JS_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"KOTLIN_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"OCAML_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"PERL_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"PHP_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"POWERSHELL_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"PYTHON_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"RUBY_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"RUST_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"SCALA_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"SWIFT_POST_PROCESS_FILE")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("inlineCode",{parentName:"li"},"TS_POST_PROCESS_FILE"))),Object(o.b)("h2",{id:"example"},"Example"),Object(o.b)("p",null,"Let's see how to pass Ruby generated files to Rubocop, a static code analysis/linter/formatter tool."),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{}),'# First, export the required environment variable\nexport RUBY_POST_PROCESS_FILE="/usr/local/bin/rubocop -a"\n\nexport OPENAPI_DOC="https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"\n\n# Invoke the generator with --enable-post-process-file\nopenapi-generator generate --enable-post-process-file -i $OPENAPI_DOC -g ruby -o .out-ruby/\n')),Object(o.b)("p",null,"You will now see messages logged about which files have been processed:"),Object(o.b)("pre",null,Object(o.b)("code",Object(r.a)({parentName:"pre"},{}),"[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.rspec\n[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb\n[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb\n[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb\n[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb\n[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb\n[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb\n[main] INFO o.o.codegen.TemplateManager - Skipped /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)\n[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/VERSION\n[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/FILES\n")))}s.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.a.createContext({}),s=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=s(e.components);return a.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},O=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),b=s(n),O=r,m=b["".concat(i,".").concat(O)]||b[O]||u[O]||o;return n?a.a.createElement(m,l({ref:t},c,{components:n})):a.a.createElement(m,l({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=O;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.a.createContext({}),s=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=s(e.components);return a.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},O=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),b=s(n),O=r,m=b["".concat(i,".").concat(O)]||b[O]||u[O]||o;return n?a.a.createElement(m,l({ref:t},c,{components:n})):a.a.createElement(m,l({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=O;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),u=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=u(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(n),h=o,m=p["".concat(i,".").concat(h)]||p[h]||b[h]||r;return n?a.a.createElement(m,c({ref:t},l,{components:n})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=a.a.createContext({}),u=function(e){var t=a.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},p=function(e){var t=u(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},h=Object(o.forwardRef)((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(n),h=o,m=p["".concat(i,".").concat(h)]||p[h]||b[h]||r;return n?a.a.createElement(m,c({ref:t},l,{components:n})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var l=2;lCSC: warning CS2002 in Xamarin?",id:"how-do-i-fix-csc--warning-cs2002-in-xamarin",children:[]}]},{value:"Objective-C",id:"objective-c",children:[{value:"How do I run integration test with Petstore ObjC API client?",id:"how-do-i-run-integration-test-with-petstore-objc-api-client",children:[]}]},{value:"Swift",id:"swift",children:[{value:"How do I run integration test with Petstore Swift API client?",id:"how-do-i-run-integration-test-with-petstore-swift-api-client",children:[]},{value:"Is Swift (2.x) generator still actively maintained?",id:"is-swift-2x-generator-still-actively-maintained",children:[]}]},{value:"TypeScript",id:"typescript",children:[{value:"The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?",id:"the-json-response-fails-to-deserialize-due-to-change-in-variable-naming-snake_case-to-camelcase-is-there-any-way-to-keep-the-original-naming",children:[]}]}],s={rightToc:l};function p(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h3",{id:"what-are-some-server-generator-use-cases"},"What are some server generator use cases?"),Object(i.b)("p",null,"We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for ASP.NET and Azure Functions (to name only a few)."),Object(i.b)("p",null,"Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"prototyping")," - one can generate the server code and have a functional API backend very quickly to try different things or features."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"mocking")," - easily provide an API backend for mocking based on the examples field defined in the response object."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"migration")," - let's say one wants to migrate an API backend from Ruby on Rails to Java Spring. The server generator can save a lot of time in implementing and verify each endpoint in the new API backend."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"evaluating"),' - when you want to try a new language or framework, and a typical "Hello, World" is too trivial.')),Object(i.b)("h2",{id:"java"},"Java"),Object(i.b)("h3",{id:"the-api-client-has-ssl-errors-due-to-an-invalid-certificate-is-there-a-way-to-bypass-that"},"The API client has SSL errors due to an invalid certificate. Is there a way to bypass that?"),Object(i.b)("p",null,"Yes, please refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"http://stackoverflow.com/a/6055903/677735"}),"http://stackoverflow.com/a/6055903/677735")),Object(i.b)("h3",{id:"how-can-i-customize-the-feign-client-templates"},"How can I customize the Feign client templates?"),Object(i.b)("p",null,"You will need to provide customized files in ",Object(i.b)("inlineCode",{parentName:"p"},"Java/libraries/feign")," under the resources folder and pass the location via the ",Object(i.b)("inlineCode",{parentName:"p"},"-t")," option."),Object(i.b)("p",null,"In your Gradle build script, please add the following (example):"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign\n")),Object(i.b)("h2",{id:"android"},"Android"),Object(i.b)("h3",{id:"how-can-i-generate-an-android-sdk"},"How can I generate an Android SDK?"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"The Java SDK is also compatible with Android.")),Object(i.b)("p",null,"[RECOMMENDED]"," To generate the Java SDK with ",Object(i.b)("inlineCode",{parentName:"p"},"okhttp")," and ",Object(i.b)("inlineCode",{parentName:"p"},"gson")," libraries, run the following:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"mvn clean package\njava -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \\\n -l java --library=okhttp-gson \\\n --additional-properties hideGenerationTimestamp=true \\\n -o /var/tmp/java/okhttp-gson/ \n")),Object(i.b)("p",null,"You can also generate the Java SDK with other HTTP libraries by replacing ",Object(i.b)("inlineCode",{parentName:"p"},"okhttp-gson")," with ",Object(i.b)("inlineCode",{parentName:"p"},"retrofit")," for example. For a list of support libraries, please run"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java\n")),Object(i.b)("p",null,"To generate the Android SDK with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/mcxiaoke/android-volley"}),Object(i.b)("inlineCode",{parentName:"a"},"volley")),", please run"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"mvn clean package\njava -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \\\n -l android --library=volley \\\n -o /var/tmp/android/volley/ \n")),Object(i.b)("p",null,"We do ",Object(i.b)("strong",{parentName:"p"},"not")," recommend using the default HTTP library (Apache HttpClient) with ",Object(i.b)("inlineCode",{parentName:"p"},"android")," as it's not actively maintained."),Object(i.b)("h2",{id:"c-sharp"},"C-Sharp"),Object(i.b)("h3",{id:"how-do-i-fix-csc--warning-cs2002-in-xamarin"},"How do I fix ",Object(i.b)("inlineCode",{parentName:"h3"},"CSC: warning CS2002")," in Xamarin?"),Object(i.b)("p",null,"The full warning might look like this: ",Object(i.b)("inlineCode",{parentName:"p"},"CSC: warning CS2002: Source file 'Api/FakeApi.cs' specified multiple times")),Object(i.b)("p",null,"The warning has no impact on the build process so you should be able to build the solution without issue. The warning should be addressed in the upcoming stable release of Xamarin. "),Object(i.b)("h2",{id:"objective-c"},"Objective-C"),Object(i.b)("h3",{id:"how-do-i-run-integration-test-with-petstore-objc-api-client"},"How do I run integration test with Petstore ObjC API client?"),Object(i.b)("p",null,"Here are the steps:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/objc/default/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("p",null,"Besides ",Object(i.b)("inlineCode",{parentName:"p"},"default")," (folder) ObjC API client, there's also ",Object(i.b)("inlineCode",{parentName:"p"},"core-data")," for another ObjC API client with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Core_Data"}),"Core Data support"),"."),Object(i.b)("h2",{id:"swift"},"Swift"),Object(i.b)("h3",{id:"how-do-i-run-integration-test-with-petstore-swift-api-client"},"How do I run integration test with Petstore Swift API client?"),Object(i.b)("p",null,"Here are the steps:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/swift/default/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("p",null,"Besides ",Object(i.b)("inlineCode",{parentName:"p"},"default")," (folder), there's another folder ",Object(i.b)("inlineCode",{parentName:"p"},"promisekit")," for Swift API client with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/mxcl/PromiseKit"}),"PromiseKit support")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/swift/promisekit/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("h3",{id:"is-swift-2x-generator-still-actively-maintained"},"Is Swift (2.x) generator still actively maintained?"),Object(i.b)("p",null,"No, please use ",Object(i.b)("inlineCode",{parentName:"p"},"swift3")," or ",Object(i.b)("inlineCode",{parentName:"p"},"swift4")," generator instead as we want to focus on Swift 3.x, 4.x."),Object(i.b)("h2",{id:"typescript"},"TypeScript"),Object(i.b)("h3",{id:"the-json-response-fails-to-deserialize-due-to-change-in-variable-naming-snake_case-to-camelcase-is-there-any-way-to-keep-the-original-naming"},"The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?"),Object(i.b)("p",null,"Yes, please use the following option when generating TypeScript clients:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{})," modelPropertyNaming\n Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)\n")))}p.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),p=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=p(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=p(n),u=a,h=b["".concat(o,".").concat(u)]||b[u]||d[u]||i;return n?r.a.createElement(h,c({ref:t},s,{components:n})):r.a.createElement(h,c({ref:t},s))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var s=2;sCSC: warning CS2002 in Xamarin?",id:"how-do-i-fix-csc--warning-cs2002-in-xamarin",children:[]}]},{value:"Objective-C",id:"objective-c",children:[{value:"How do I run integration test with Petstore ObjC API client?",id:"how-do-i-run-integration-test-with-petstore-objc-api-client",children:[]}]},{value:"Swift",id:"swift",children:[{value:"How do I run integration test with Petstore Swift API client?",id:"how-do-i-run-integration-test-with-petstore-swift-api-client",children:[]},{value:"Is Swift (2.x) generator still actively maintained?",id:"is-swift-2x-generator-still-actively-maintained",children:[]}]},{value:"TypeScript",id:"typescript",children:[{value:"The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?",id:"the-json-response-fails-to-deserialize-due-to-change-in-variable-naming-snake_case-to-camelcase-is-there-any-way-to-keep-the-original-naming",children:[]}]}],s={rightToc:l};function p(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h3",{id:"what-are-some-server-generator-use-cases"},"What are some server generator use cases?"),Object(i.b)("p",null,"We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for ASP.NET and Azure Functions (to name only a few)."),Object(i.b)("p",null,"Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"prototyping")," - one can generate the server code and have a functional API backend very quickly to try different things or features."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"mocking")," - easily provide an API backend for mocking based on the examples field defined in the response object."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"migration")," - let's say one wants to migrate an API backend from Ruby on Rails to Java Spring. The server generator can save a lot of time in implementing and verify each endpoint in the new API backend."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("strong",{parentName:"li"},"evaluating"),' - when you want to try a new language or framework, and a typical "Hello, World" is too trivial.')),Object(i.b)("h2",{id:"java"},"Java"),Object(i.b)("h3",{id:"the-api-client-has-ssl-errors-due-to-an-invalid-certificate-is-there-a-way-to-bypass-that"},"The API client has SSL errors due to an invalid certificate. Is there a way to bypass that?"),Object(i.b)("p",null,"Yes, please refer to ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"http://stackoverflow.com/a/6055903/677735"}),"http://stackoverflow.com/a/6055903/677735")),Object(i.b)("h3",{id:"how-can-i-customize-the-feign-client-templates"},"How can I customize the Feign client templates?"),Object(i.b)("p",null,"You will need to provide customized files in ",Object(i.b)("inlineCode",{parentName:"p"},"Java/libraries/feign")," under the resources folder and pass the location via the ",Object(i.b)("inlineCode",{parentName:"p"},"-t")," option."),Object(i.b)("p",null,"In your Gradle build script, please add the following (example):"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign\n")),Object(i.b)("h2",{id:"android"},"Android"),Object(i.b)("h3",{id:"how-can-i-generate-an-android-sdk"},"How can I generate an Android SDK?"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"The Java SDK is also compatible with Android.")),Object(i.b)("p",null,"[RECOMMENDED]"," To generate the Java SDK with ",Object(i.b)("inlineCode",{parentName:"p"},"okhttp")," and ",Object(i.b)("inlineCode",{parentName:"p"},"gson")," libraries, run the following:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"mvn clean package\njava -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \\\n -l java --library=okhttp-gson \\\n --additional-properties hideGenerationTimestamp=true \\\n -o /var/tmp/java/okhttp-gson/ \n")),Object(i.b)("p",null,"You can also generate the Java SDK with other HTTP libraries by replacing ",Object(i.b)("inlineCode",{parentName:"p"},"okhttp-gson")," with ",Object(i.b)("inlineCode",{parentName:"p"},"retrofit")," for example. For a list of support libraries, please run"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java\n")),Object(i.b)("p",null,"To generate the Android SDK with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/mcxiaoke/android-volley"}),Object(i.b)("inlineCode",{parentName:"a"},"volley")),", please run"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"mvn clean package\njava -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \\\n -l android --library=volley \\\n -o /var/tmp/android/volley/ \n")),Object(i.b)("p",null,"We do ",Object(i.b)("strong",{parentName:"p"},"not")," recommend using the default HTTP library (Apache HttpClient) with ",Object(i.b)("inlineCode",{parentName:"p"},"android")," as it's not actively maintained."),Object(i.b)("h2",{id:"c-sharp"},"C-Sharp"),Object(i.b)("h3",{id:"how-do-i-fix-csc--warning-cs2002-in-xamarin"},"How do I fix ",Object(i.b)("inlineCode",{parentName:"h3"},"CSC: warning CS2002")," in Xamarin?"),Object(i.b)("p",null,"The full warning might look like this: ",Object(i.b)("inlineCode",{parentName:"p"},"CSC: warning CS2002: Source file 'Api/FakeApi.cs' specified multiple times")),Object(i.b)("p",null,"The warning has no impact on the build process so you should be able to build the solution without issue. The warning should be addressed in the upcoming stable release of Xamarin. "),Object(i.b)("h2",{id:"objective-c"},"Objective-C"),Object(i.b)("h3",{id:"how-do-i-run-integration-test-with-petstore-objc-api-client"},"How do I run integration test with Petstore ObjC API client?"),Object(i.b)("p",null,"Here are the steps:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/objc/default/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("p",null,"Besides ",Object(i.b)("inlineCode",{parentName:"p"},"default")," (folder) ObjC API client, there's also ",Object(i.b)("inlineCode",{parentName:"p"},"core-data")," for another ObjC API client with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://en.wikipedia.org/wiki/Core_Data"}),"Core Data support"),"."),Object(i.b)("h2",{id:"swift"},"Swift"),Object(i.b)("h3",{id:"how-do-i-run-integration-test-with-petstore-swift-api-client"},"How do I run integration test with Petstore Swift API client?"),Object(i.b)("p",null,"Here are the steps:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/swift/default/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("p",null,"Besides ",Object(i.b)("inlineCode",{parentName:"p"},"default")," (folder), there's another folder ",Object(i.b)("inlineCode",{parentName:"p"},"promisekit")," for Swift API client with ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/mxcl/PromiseKit"}),"PromiseKit support")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"git clone https://github.com/openapitools/openapi-generator.git\ncd openapi-generator/samples/client/petstore/swift/promisekit/OpenAPIClientTests\nmvn integration-test\n")),Object(i.b)("h3",{id:"is-swift-2x-generator-still-actively-maintained"},"Is Swift (2.x) generator still actively maintained?"),Object(i.b)("p",null,"No, please use ",Object(i.b)("inlineCode",{parentName:"p"},"swift3")," or ",Object(i.b)("inlineCode",{parentName:"p"},"swift4")," generator instead as we want to focus on Swift 3.x, 4.x."),Object(i.b)("h2",{id:"typescript"},"TypeScript"),Object(i.b)("h3",{id:"the-json-response-fails-to-deserialize-due-to-change-in-variable-naming-snake_case-to-camelcase-is-there-any-way-to-keep-the-original-naming"},"The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?"),Object(i.b)("p",null,"Yes, please use the following option when generating TypeScript clients:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{})," modelPropertyNaming\n Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)\n")))}p.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),p=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=p(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},u=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=p(n),u=a,h=b["".concat(o,".").concat(u)]||b[u]||d[u]||i;return n?r.a.createElement(h,c({ref:t},s,{components:n})):r.a.createElement(h,c({ref:t},s))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var s=2;s ~/bin/openapitools/openapi-generator-cli\nchmod u+x ~/bin/openapitools/openapi-generator-cli\nexport PATH=$PATH:~/bin/openapitools/\n")),Object(r.b)("p",null,"Now, ",Object(r.b)("inlineCode",{parentName:"p"},"openapi-generator-cli"),' is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,\nit will execute as normal. If a newer version is found, the script will download the latest release and execute it.'),Object(r.b)("p",null,"If you need to invoke an older version of the generator, you can define the variable ",Object(r.b)("inlineCode",{parentName:"p"},"OPENAPI_GENERATOR_VERSION")," either ad hoc or globally. You can export this variable if you'd like to persist a specific release version."),Object(r.b)("p",null,"Examples:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),'# Execute latest released openapi-generator-cli\nopenapi-generator-cli version\n\n# Execute version 3.1.0 for the current invocation, regardless of the latest released version\nOPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version\n\n# Execute version 3.1.0-SNAPSHOT for the current invocation\nOPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version\n\n# Execute version 3.0.2 for every invocation in the current shell session\nexport OPENAPI_GENERATOR_VERSION=3.0.2\nopenapi-generator-cli version # is 3.0.2\nopenapi-generator-cli version # is also 3.0.2\n\n# To "install" a specific version, set the variable in .bashrc/.bash_profile\necho "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc\nsource ~/.bashrc\nopenapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc\n')))}s.isMDXComponent=!0},312:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return O}));var n=a(0),o=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function p(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=o.a.createContext({}),s=function(e){var t=o.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):p({},t,{},e)),a},b=function(e){var t=s(e.components);return o.a.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),b=s(a),m=n,O=b["".concat(l,".").concat(m)]||b[m]||u[m]||r;return a?o.a.createElement(O,p({ref:t},i,{components:a})):o.a.createElement(O,p({ref:t},i))}));function O(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=m;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:n,l[1]=p;for(var i=2;i ~/bin/openapitools/openapi-generator-cli\nchmod u+x ~/bin/openapitools/openapi-generator-cli\nexport PATH=$PATH:~/bin/openapitools/\n")),Object(r.b)("p",null,"Now, ",Object(r.b)("inlineCode",{parentName:"p"},"openapi-generator-cli"),' is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,\nit will execute as normal. If a newer version is found, the script will download the latest release and execute it.'),Object(r.b)("p",null,"If you need to invoke an older version of the generator, you can define the variable ",Object(r.b)("inlineCode",{parentName:"p"},"OPENAPI_GENERATOR_VERSION")," either ad hoc or globally. You can export this variable if you'd like to persist a specific release version."),Object(r.b)("p",null,"Examples:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-bash"}),'# Execute latest released openapi-generator-cli\nopenapi-generator-cli version\n\n# Execute version 3.1.0 for the current invocation, regardless of the latest released version\nOPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version\n\n# Execute version 3.1.0-SNAPSHOT for the current invocation\nOPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version\n\n# Execute version 3.0.2 for every invocation in the current shell session\nexport OPENAPI_GENERATOR_VERSION=3.0.2\nopenapi-generator-cli version # is 3.0.2\nopenapi-generator-cli version # is also 3.0.2\n\n# To "install" a specific version, set the variable in .bashrc/.bash_profile\necho "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc\nsource ~/.bashrc\nopenapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc\n')))}s.isMDXComponent=!0},312:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return O}));var n=a(0),o=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function p(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var i=o.a.createContext({}),s=function(e){var t=o.a.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):p({},t,{},e)),a},b=function(e){var t=s(e.components);return o.a.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),b=s(a),m=n,O=b["".concat(l,".").concat(m)]||b[m]||u[m]||r;return a?o.a.createElement(O,p({ref:t},i,{components:a})):o.a.createElement(O,p({ref:t},i))}));function O(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,l=new Array(r);l[0]=m;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:n,l[1]=p;for(var i=2;i=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),p=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},d=function(e){var t=p(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},u=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(r),u=n,h=d["".concat(i,".").concat(u)]||d[u]||g[u]||a;return r?o.a.createElement(h,c({ref:t},l,{components:r})):o.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=u;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),p=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c({},t,{},e)),r},d=function(e){var t=p(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},g=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(r),g=n,h=d["".concat(i,".").concat(g)]||d[g]||u[g]||a;return r?o.a.createElement(h,c({ref:t},l,{components:r})):o.a.createElement(h,c({ref:t},l))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=g;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(c[t]=e[t]);return c}(e,a);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(c[t]=e[t])}return c}var p=c.a.createContext({}),i=function(e){var a=c.a.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},o=function(e){var a=i(e.components);return c.a.createElement(p.Provider,{value:a},e.children)},j={inlineCode:"code",wrapper:function(e){var a=e.children;return c.a.createElement(c.a.Fragment,{},a)}},O=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,b=e.originalType,n=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),o=i(t),O=r,m=o["".concat(n,".").concat(O)]||o[O]||j[O]||b;return t?c.a.createElement(m,l({ref:a},p,{components:t})):c.a.createElement(m,l({ref:a},p))}));function m(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var b=t.length,n=new Array(b);n[0]=O;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,n[1]=l;for(var p=2;p=0||(c[t]=e[t]);return c}(e,a);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(c[t]=e[t])}return c}var p=c.a.createContext({}),i=function(e){var a=c.a.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},o=function(e){var a=i(e.components);return c.a.createElement(p.Provider,{value:a},e.children)},j={inlineCode:"code",wrapper:function(e){var a=e.children;return c.a.createElement(c.a.Fragment,{},a)}},O=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,b=e.originalType,n=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),o=i(t),O=r,m=o["".concat(n,".").concat(O)]||o[O]||j[O]||b;return t?c.a.createElement(m,l({ref:a},p,{components:t})):c.a.createElement(m,l({ref:a},p))}));function m(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var b=t.length,n=new Array(b);n[0]=O;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,n[1]=l;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),u=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=u(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),b=u(n),d=r,g=b["".concat(i,".").concat(d)]||b[d]||s[d]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=a.a.createContext({}),u=function(e){var t=a.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},b=function(e){var t=u(e.components);return a.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),b=u(n),d=r,g=b["".concat(i,".").concat(d)]||b[d]||s[d]||o;return n?a.a.createElement(g,c({ref:t},p,{components:n})):a.a.createElement(g,c({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var p=2;p=0||(c[t]=e[t]);return c}(e,a);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(c[t]=e[t])}return c}var p=c.a.createContext({}),o=function(e){var a=c.a.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},i=function(e){var a=o(e.components);return c.a.createElement(p.Provider,{value:a},e.children)},j={inlineCode:"code",wrapper:function(e){var a=e.children;return c.a.createElement(c.a.Fragment,{},a)}},O=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,b=e.originalType,n=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),i=o(t),O=r,m=i["".concat(n,".").concat(O)]||i[O]||j[O]||b;return t?c.a.createElement(m,l({ref:a},p,{components:t})):c.a.createElement(m,l({ref:a},p))}));function m(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var b=t.length,n=new Array(b);n[0]=O;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,n[1]=l;for(var p=2;p=0||(c[t]=e[t]);return c}(e,a);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(c[t]=e[t])}return c}var p=c.a.createContext({}),o=function(e){var a=c.a.useContext(p),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},i=function(e){var a=o(e.components);return c.a.createElement(p.Provider,{value:a},e.children)},j={inlineCode:"code",wrapper:function(e){var a=e.children;return c.a.createElement(c.a.Fragment,{},a)}},O=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,b=e.originalType,n=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),i=o(t),O=r,m=i["".concat(n,".").concat(O)]||i[O]||j[O]||b;return t?c.a.createElement(m,l({ref:a},p,{components:t})):c.a.createElement(m,l({ref:a},p))}));function m(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var b=t.length,n=new Array(b);n[0]=O;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,n[1]=l;for(var p=2;p\n io.swagger\n swagger-codegen\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator\n\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Cli:")),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger\n swagger-codegen-cli\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-cli\n\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Maven plugin:")),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger\n swagger-codegen-maven-plugin\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-maven-plugin\n\n")),Object(o.b)("h2",{id:"changes-in-maven-plugin"},"Changes in Maven Plugin"),Object(o.b)("p",null,"OpenAPI Generator 3.0.0 has introduced ",Object(o.b)("inlineCode",{parentName:"p"},"")," and deprecated ",Object(o.b)("inlineCode",{parentName:"p"},""),', because this refers to generator names which embed more than just "language".'),Object(o.b)("p",null,"If both options are present, you'll be presented with an error. If only ",Object(o.b)("inlineCode",{parentName:"p"},"")," is provided, you'll be presented instructions for updating to the new config."),Object(o.b)("h2",{id:"new-generators-names"},"New generators names"),Object(o.b)("p",null,"When you run OpenAPI Generator, you need to select a target generator (",Object(o.b)("inlineCode",{parentName:"p"},"-g")," option in the cli).\nAll languages of ",Object(o.b)("inlineCode",{parentName:"p"},"swagger-codegen")," have been migrated to ",Object(o.b)("inlineCode",{parentName:"p"},"openapi-generator"),", but some names were changed, in order to be more consistent."),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"swagger-codegen")),Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"openapi-generator")))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"akka-scala")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala-akka"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala-httpclient"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"jaxrs")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"jaxrs-jersey"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"qt5cpp")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-qt5"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpprest")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-restsdk"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"tizen")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-tizen"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"sinatra")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"ruby-sinatra"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swift")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swift2-deprecated"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"lumen")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-lumen"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"slim")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-slim"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"ze-ph")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-mezzio-ph"))))),Object(o.b)("p",null,"We provide a temporary mapping in code for these old values. You'll receive a warning with instructions to migrate to the new names."),Object(o.b)("h2",{id:"new-parameters-name"},"New parameters name"),Object(o.b)("p",null,'Some parameters were renamed.\nOften you need to replace "Swagger", with "OpenAPI".\nSome examples:'),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"swagger-codegen")),Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"openapi-generator")))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"debugSwagger")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"debugOpenAPI"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"GenerateSwaggerMetadata")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"GenerateOpenAPIMetadata"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swagger.codegen.undertow.apipackage")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"openapi.codegen.undertow.apipackage"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swagger.codegen.undertow.modelpackage")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"openapi.codegen.undertow.modelpackage"))))),Object(o.b)("h2",{id:"renamed-mustache-template-variables"},"Renamed Mustache Template Variables"),Object(o.b)("p",null,"The template variable ",Object(o.b)("inlineCode",{parentName:"p"},"{{datatype}}")," was renamed to ",Object(o.b)("inlineCode",{parentName:"p"},"{{dataType}}")," for consistency reason.\nCorresponding java code: ",Object(o.b)("inlineCode",{parentName:"p"},"CodegenProperty.datatype")," is renamed to ",Object(o.b)("inlineCode",{parentName:"p"},"CodegenProperty.dataType"),"."),Object(o.b)("p",null,"(If you're ",Object(o.b)("strong",{parentName:"p"},"not")," using customized templates with the ",Object(o.b)("inlineCode",{parentName:"p"},"-t")," option, you can ignore the mustache variable renaming above.)"),Object(o.b)("h2",{id:"ignore-file"},"Ignore file"),Object(o.b)("p",null,Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen-ignore")," is replaced by ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore"),".\nThe syntax inside the file stays the same."),Object(o.b)("p",null,"You don't need to rename the file manually, OpenAPI Generator will do it when your run it against an existing output directory.\n(When there is no ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," in a folder, if a ",Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen-ignore")," file is present it will be considered and renamed to ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore"),")."),Object(o.b)("h2",{id:"metadata-folder"},"Metadata folder"),Object(o.b)("p",null,"The metadata folder (to store the ",Object(o.b)("inlineCode",{parentName:"p"},"VERSION")," file for example) is now called ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator/")," instead of ",Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen/"),"."),Object(o.b)("h2",{id:"new-default-values-for-the-generated-code"},"New default values for the generated code"),Object(o.b)("p",null,"If you use a generator without specifying each parameter, you might see some differences in the generated code.\nAs example the default package name used in the generated code has changed.\nYou need to have a look at the specific value, depending of your target language, but often ",Object(o.b)("inlineCode",{parentName:"p"},"Swagger")," \xees replaced by ",Object(o.b)("inlineCode",{parentName:"p"},"OpenAPITools")," and ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger")," is replaced by ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools"),".\nConcretely if you did not specify anything when you are generating java code, a file ",Object(o.b)("inlineCode",{parentName:"p"},"org/openapitools/api/PetApi.java")," might be generated instead of ",Object(o.b)("inlineCode",{parentName:"p"},"io/swagger/api/PetApi.java"),"."),Object(o.b)("p",null,"If this is a problem for you, you need to explicitly set the the parameter value in order to match with the ",Object(o.b)("inlineCode",{parentName:"p"},"swagger-codgen")," default value (",Object(o.b)("inlineCode",{parentName:"p"},"apiPackage")," == ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger")," in the previous example with the java generator)."),Object(o.b)("h2",{id:"new-fully-qualified-name-for-the-classes"},"New fully qualified name for the classes"),Object(o.b)("p",null,"If you have extended some generators in your project, and you are looking for a specific class, replace the ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger.codegen")," package (old name) with ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools.codegen")," package (new name)."),Object(o.b)("p",null,"Example: ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools.codegen.DefaultGenerator")),Object(o.b)("h2",{id:"body-parameter-name"},"Body parameter name"),Object(o.b)("p",null,"\u203c\ufe0f Since 4.0.0-beta, the body parameter name in OAS v2 is automatically preserved in the vendor extension ",Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")),Object(o.b)("p",null,"In OpenAPI spec v3, there's no body parameter, which is replaced by ",Object(o.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#request-body-object"}),"Request Body Object"),'. The parameter name for Request Body is named automatically based on the model name (e.g. User). To control how the "Request Body" parameter is named, please add the vendor extension ',Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")," to the operation:"),Object(o.b)("p",null,"OpenAPI Spec v3:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /pet:\n post:\n tags:\n - pet\n summary: Add a new pet to the store\n description: ''\n operationId: addPet\n x-codegen-request-body-name: new_body_name\n responses:\n '405':\n description: Invalid input\n security:\n - petstore_auth:\n - 'write:pets'\n - 'read:pets'\n requestBody:\n $ref: '#/components/requestBodies/Pet'\n")),Object(o.b)("p",null,"OpenAPI Spec v2:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /pet:\n post:\n tags:\n - pet\n summary: Add a new pet to the store\n description: ''\n operationId: addPet\n x-codegen-request-body-name: new_body_name\n consumes:\n - application/json\n - application/xml\n produces:\n - application/xml\n - application/json\n parameters:\n - in: body\n name: body\n description: Pet object that needs to be added to the store\n required: true\n schema:\n $ref: '#/definitions/Pet'\n responses:\n '405':\n description: Invalid input\n security:\n - petstore_auth:\n - 'write:pets'\n - 'read:pets'\n")),Object(o.b)("p",null,"If your API client is using named parameters in the function call (e.g. Perl required & optional parameters, Ruby optional parameters), you will need to add ",Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")," to the spec to restore the original body parameter name."),Object(o.b)("h2",{id:"default-basepath"},"Default basePath"),Object(o.b)("p",null,"The default ",Object(o.b)("inlineCode",{parentName:"p"},"basePath")," has been changed from ",Object(o.b)("inlineCode",{parentName:"p"},"https://localhost")," to ",Object(o.b)("inlineCode",{parentName:"p"},"http://localhost")," (http without s)"),Object(o.b)("h2",{id:"nullable"},"Nullable"),Object(o.b)("p",null,"OpenAPI spec v3 has better support for ",Object(o.b)("inlineCode",{parentName:"p"},"nullable"),". If you're still using OpenAPI/Swagger spec v2, please use ",Object(o.b)("inlineCode",{parentName:"p"},"x-nullable: true")," instead."))}c.isMDXComponent=!0},312:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return O}));var n=a(0),r=a.n(n);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},d=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,b=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(a),s=n,O=d["".concat(b,".").concat(s)]||d[s]||m[s]||o;return a?r.a.createElement(O,i({ref:t},p,{components:a})):r.a.createElement(O,i({ref:t},p))}));function O(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,b=new Array(o);b[0]=s;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var p=2;p\n io.swagger\n swagger-codegen\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator\n\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Cli:")),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger\n swagger-codegen-cli\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-cli\n\n")),Object(o.b)("p",null,Object(o.b)("strong",{parentName:"p"},"Maven plugin:")),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger\n swagger-codegen-maven-plugin\n\n")),Object(o.b)("p",null,"New:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-maven-plugin\n\n")),Object(o.b)("h2",{id:"changes-in-maven-plugin"},"Changes in Maven Plugin"),Object(o.b)("p",null,"OpenAPI Generator 3.0.0 has introduced ",Object(o.b)("inlineCode",{parentName:"p"},"")," and deprecated ",Object(o.b)("inlineCode",{parentName:"p"},""),', because this refers to generator names which embed more than just "language".'),Object(o.b)("p",null,"If both options are present, you'll be presented with an error. If only ",Object(o.b)("inlineCode",{parentName:"p"},"")," is provided, you'll be presented instructions for updating to the new config."),Object(o.b)("h2",{id:"new-generators-names"},"New generators names"),Object(o.b)("p",null,"When you run OpenAPI Generator, you need to select a target generator (",Object(o.b)("inlineCode",{parentName:"p"},"-g")," option in the cli).\nAll languages of ",Object(o.b)("inlineCode",{parentName:"p"},"swagger-codegen")," have been migrated to ",Object(o.b)("inlineCode",{parentName:"p"},"openapi-generator"),", but some names were changed, in order to be more consistent."),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"swagger-codegen")),Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"openapi-generator")))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"akka-scala")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala-akka"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"scala-httpclient"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"jaxrs")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"jaxrs-jersey"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"qt5cpp")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-qt5"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpprest")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-restsdk"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"tizen")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"cpp-tizen"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"sinatra")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"ruby-sinatra"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swift")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swift2-deprecated"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"lumen")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-lumen"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"slim")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-slim"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"ze-ph")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"php-mezzio-ph"))))),Object(o.b)("p",null,"We provide a temporary mapping in code for these old values. You'll receive a warning with instructions to migrate to the new names."),Object(o.b)("h2",{id:"new-parameters-name"},"New parameters name"),Object(o.b)("p",null,'Some parameters were renamed.\nOften you need to replace "Swagger", with "OpenAPI".\nSome examples:'),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"swagger-codegen")),Object(o.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"name in ",Object(o.b)("inlineCode",{parentName:"th"},"openapi-generator")))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"debugSwagger")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"debugOpenAPI"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"GenerateSwaggerMetadata")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"GenerateOpenAPIMetadata"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swagger.codegen.undertow.apipackage")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"openapi.codegen.undertow.apipackage"))),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"swagger.codegen.undertow.modelpackage")),Object(o.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(o.b)("inlineCode",{parentName:"td"},"openapi.codegen.undertow.modelpackage"))))),Object(o.b)("h2",{id:"renamed-mustache-template-variables"},"Renamed Mustache Template Variables"),Object(o.b)("p",null,"The template variable ",Object(o.b)("inlineCode",{parentName:"p"},"{{datatype}}")," was renamed to ",Object(o.b)("inlineCode",{parentName:"p"},"{{dataType}}")," for consistency reason.\nCorresponding java code: ",Object(o.b)("inlineCode",{parentName:"p"},"CodegenProperty.datatype")," is renamed to ",Object(o.b)("inlineCode",{parentName:"p"},"CodegenProperty.dataType"),"."),Object(o.b)("p",null,"(If you're ",Object(o.b)("strong",{parentName:"p"},"not")," using customized templates with the ",Object(o.b)("inlineCode",{parentName:"p"},"-t")," option, you can ignore the mustache variable renaming above.)"),Object(o.b)("h2",{id:"ignore-file"},"Ignore file"),Object(o.b)("p",null,Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen-ignore")," is replaced by ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore"),".\nThe syntax inside the file stays the same."),Object(o.b)("p",null,"You don't need to rename the file manually, OpenAPI Generator will do it when your run it against an existing output directory.\n(When there is no ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," in a folder, if a ",Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen-ignore")," file is present it will be considered and renamed to ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore"),")."),Object(o.b)("h2",{id:"metadata-folder"},"Metadata folder"),Object(o.b)("p",null,"The metadata folder (to store the ",Object(o.b)("inlineCode",{parentName:"p"},"VERSION")," file for example) is now called ",Object(o.b)("inlineCode",{parentName:"p"},".openapi-generator/")," instead of ",Object(o.b)("inlineCode",{parentName:"p"},".swagger-codegen/"),"."),Object(o.b)("h2",{id:"new-default-values-for-the-generated-code"},"New default values for the generated code"),Object(o.b)("p",null,"If you use a generator without specifying each parameter, you might see some differences in the generated code.\nAs example the default package name used in the generated code has changed.\nYou need to have a look at the specific value, depending of your target language, but often ",Object(o.b)("inlineCode",{parentName:"p"},"Swagger")," \xees replaced by ",Object(o.b)("inlineCode",{parentName:"p"},"OpenAPITools")," and ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger")," is replaced by ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools"),".\nConcretely if you did not specify anything when you are generating java code, a file ",Object(o.b)("inlineCode",{parentName:"p"},"org/openapitools/api/PetApi.java")," might be generated instead of ",Object(o.b)("inlineCode",{parentName:"p"},"io/swagger/api/PetApi.java"),"."),Object(o.b)("p",null,"If this is a problem for you, you need to explicitly set the the parameter value in order to match with the ",Object(o.b)("inlineCode",{parentName:"p"},"swagger-codgen")," default value (",Object(o.b)("inlineCode",{parentName:"p"},"apiPackage")," == ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger")," in the previous example with the java generator)."),Object(o.b)("h2",{id:"new-fully-qualified-name-for-the-classes"},"New fully qualified name for the classes"),Object(o.b)("p",null,"If you have extended some generators in your project, and you are looking for a specific class, replace the ",Object(o.b)("inlineCode",{parentName:"p"},"io.swagger.codegen")," package (old name) with ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools.codegen")," package (new name)."),Object(o.b)("p",null,"Example: ",Object(o.b)("inlineCode",{parentName:"p"},"org.openapitools.codegen.DefaultGenerator")),Object(o.b)("h2",{id:"body-parameter-name"},"Body parameter name"),Object(o.b)("p",null,"\u203c\ufe0f Since 4.0.0-beta, the body parameter name in OAS v2 is automatically preserved in the vendor extension ",Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")),Object(o.b)("p",null,"In OpenAPI spec v3, there's no body parameter, which is replaced by ",Object(o.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#request-body-object"}),"Request Body Object"),'. The parameter name for Request Body is named automatically based on the model name (e.g. User). To control how the "Request Body" parameter is named, please add the vendor extension ',Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")," to the operation:"),Object(o.b)("p",null,"OpenAPI Spec v3:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /pet:\n post:\n tags:\n - pet\n summary: Add a new pet to the store\n description: ''\n operationId: addPet\n x-codegen-request-body-name: new_body_name\n responses:\n '405':\n description: Invalid input\n security:\n - petstore_auth:\n - 'write:pets'\n - 'read:pets'\n requestBody:\n $ref: '#/components/requestBodies/Pet'\n")),Object(o.b)("p",null,"OpenAPI Spec v2:"),Object(o.b)("pre",null,Object(o.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /pet:\n post:\n tags:\n - pet\n summary: Add a new pet to the store\n description: ''\n operationId: addPet\n x-codegen-request-body-name: new_body_name\n consumes:\n - application/json\n - application/xml\n produces:\n - application/xml\n - application/json\n parameters:\n - in: body\n name: body\n description: Pet object that needs to be added to the store\n required: true\n schema:\n $ref: '#/definitions/Pet'\n responses:\n '405':\n description: Invalid input\n security:\n - petstore_auth:\n - 'write:pets'\n - 'read:pets'\n")),Object(o.b)("p",null,"If your API client is using named parameters in the function call (e.g. Perl required & optional parameters, Ruby optional parameters), you will need to add ",Object(o.b)("inlineCode",{parentName:"p"},"x-codegen-request-body-name")," to the spec to restore the original body parameter name."),Object(o.b)("h2",{id:"default-basepath"},"Default basePath"),Object(o.b)("p",null,"The default ",Object(o.b)("inlineCode",{parentName:"p"},"basePath")," has been changed from ",Object(o.b)("inlineCode",{parentName:"p"},"https://localhost")," to ",Object(o.b)("inlineCode",{parentName:"p"},"http://localhost")," (http without s)"),Object(o.b)("h2",{id:"nullable"},"Nullable"),Object(o.b)("p",null,"OpenAPI spec v3 has better support for ",Object(o.b)("inlineCode",{parentName:"p"},"nullable"),". If you're still using OpenAPI/Swagger spec v2, please use ",Object(o.b)("inlineCode",{parentName:"p"},"x-nullable: true")," instead."))}c.isMDXComponent=!0},312:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return O}));var n=a(0),r=a.n(n);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},d=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,b=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(a),s=n,O=d["".concat(b,".").concat(s)]||d[s]||m[s]||o;return a?r.a.createElement(O,i({ref:t},p,{components:a})):r.a.createElement(O,i({ref:t},p))}));function O(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,b=new Array(o);b[0]=s;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b=a.a.createContext({}),p=function(e){var t=a.a.useContext(b),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},s=function(e){var t=p(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,c=e.originalType,o=e.parentName,b=i(e,["components","mdxType","originalType","parentName"]),s=p(r),m=n,d=s["".concat(o,".").concat(m)]||s[m]||u[m]||c;return r?a.a.createElement(d,l({ref:t},b,{components:r})):a.a.createElement(d,l({ref:t},b))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=r.length,o=new Array(c);o[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:n,o[1]=l;for(var b=2;b=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b=a.a.createContext({}),p=function(e){var t=a.a.useContext(b),r=t;return e&&(r="function"==typeof e?e(t):l({},t,{},e)),r},s=function(e){var t=p(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,c=e.originalType,o=e.parentName,b=i(e,["components","mdxType","originalType","parentName"]),s=p(r),d=n,m=s["".concat(o,".").concat(d)]||s[d]||u[d]||c;return r?a.a.createElement(m,l({ref:t},b,{components:r})):a.a.createElement(m,l({ref:t},b))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=r.length,o=new Array(c);o[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:n,o[1]=l;for(var b=2;b=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},d=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=b(e,["components","mdxType","originalType","parentName"]),d=c(a),m=n,u=d["".concat(l,".").concat(m)]||d[m]||s[m]||o;return a?r.a.createElement(u,i({ref:t},p,{components:a})):r.a.createElement(u,i({ref:t},p))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var p=2;p=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),c=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i({},t,{},e)),a},d=function(e){var t=c(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=b(e,["components","mdxType","originalType","parentName"]),d=c(a),m=n,u=d["".concat(l,".").concat(m)]||d[m]||s[m]||o;return a?r.a.createElement(u,i({ref:t},p,{components:a})):r.a.createElement(u,i({ref:t},p))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var b in t)hasOwnProperty.call(t,b)&&(i[b]=t[b]);i.originalType=e,i.mdxType="string"==typeof e?e:n,l[1]=i;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=a.a.createContext({}),b=function(e){var t=a.a.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},l=function(e){var t=b(e.components);return a.a.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,c=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),l=b(r),s=n,f=l["".concat(o,".").concat(s)]||l[s]||m[s]||c;return r?a.a.createElement(f,i({ref:t},u,{components:r})):a.a.createElement(f,i({ref:t},u))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=r.length,o=new Array(c);o[0]=s;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,o[1]=i;for(var u=2;u=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=a.a.createContext({}),b=function(e){var t=a.a.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):i({},t,{},e)),r},l=function(e){var t=b(e.components);return a.a.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},s=Object(n.forwardRef)((function(e,t){var r=e.components,n=e.mdxType,c=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),l=b(r),s=n,f=l["".concat(o,".").concat(s)]||l[s]||m[s]||c;return r?a.a.createElement(f,i({ref:t},u,{components:r})):a.a.createElement(f,i({ref:t},u))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var c=r.length,o=new Array(c);o[0]=s;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,o[1]=i;for(var u=2;u\n org.openapitools\n openapi-generator-maven-plugin\n ${openapi-generator-version}\n \n \n generate-client-code\n \n generate\n \n \n my-codegen\n \x3c!-- other configuration ... --\x3e\n \n \n \n \n \n org.openapitools\n my-codegen-openapi-generator\n 1.0.0\n \n \n\n")),Object(i.b)("p",null,"If you publish your artifact to a distant maven repository, do not forget to add this repository as ",Object(i.b)("inlineCode",{parentName:"p"},"pluginRepository")," for your project."),Object(i.b)("h2",{id:"selective-generation"},"Selective generation"),Object(i.b)("p",null,"You may not want to generate ",Object(i.b)("em",{parentName:"p"},"all")," models in your project. Likewise, you may want just one or two apis to be written. If that's the case, you can use system properties or ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/globals"}),"global properties")," to control the output."),Object(i.b)("p",null,"The default is generate ",Object(i.b)("em",{parentName:"p"},"everything")," supported by the specific library. Once you enable a feature, it will restrict the contents generated:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"# generate only models\n--global-property models\n\n# generate only apis\n--global-property apis\n\n# generate only supporting files\n--global-property supportingFiles\n\n# generate models and supporting files\n--global-property models,supportingFiles\n")),Object(i.b)("p",null,"To control the specific files being generated, you can pass a CSV list of what you want:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),'# generate the User and Pet models only\n--global-property models="User:Pet"\n\n# generate the User model and the supportingFile `StringUtil.java`:\n--global-property models=User,supportingFiles=StringUtil.java\n')),Object(i.b)("p",null,"To control generation of docs and tests for api and models, pass false to the option. For api, these options are ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property apiTests=false,apiDocs=false"),". For models, ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property modelTests=false,modelDocs=false"),".\nThese options default to true and don't limit the generation of the feature options listed above (like ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property api"),"):"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),'# generate only models (with tests and documentation)\n--global-property models\n\n# generate only models (with tests but no documentation)\n--global-property models,modelDocs=false\n\n# generate only User and Pet models (no tests and no documentation)\n--global-property models="User:Pet",modelTests=false\n\n# generate only apis (without tests)\n--global-property apis,apiTests=false\n\n# generate only apis (modelTests option is ignored)\n--global-property apis,modelTests=false\n')),Object(i.b)("p",null,"When using selective generation, ",Object(i.b)("em",{parentName:"p"},"only")," the templates needed for the specific generation will be used."),Object(i.b)("p",null,'To skip models defined as the form parameters in "requestBody", please use ',Object(i.b)("inlineCode",{parentName:"p"},"skipFormModel")," (default to ",Object(i.b)("inlineCode",{parentName:"p"},"true"),") (this option is introduced at v3.2.2 and ",Object(i.b)("inlineCode",{parentName:"p"},"true")," by default starting from v5.x)."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"--global-property skipFormModel=true\n")),Object(i.b)("p",null,"This option will be helpful to skip model generation due to the form parameter, which is defined differently in OAS3 as there's no form parameter in OAS3"),Object(i.b)("h2",{id:"ignore-file-format"},"Ignore file format"),Object(i.b)("p",null,"OpenAPI Generator supports a ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file, similar to ",Object(i.b)("inlineCode",{parentName:"p"},".gitignore")," or ",Object(i.b)("inlineCode",{parentName:"p"},".dockerignore")," you're probably already familiar with."),Object(i.b)("p",null,"The ignore file allows for better control over overwriting existing files than the ",Object(i.b)("inlineCode",{parentName:"p"},"--skip-overwrite")," flag. With the ignore file, you can specify individual files or directories can be ignored. This can be useful, for example if you only want a subset of the generated code."),Object(i.b)("p",null,"Examples:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"# OpenAPI Generator Ignore\n# Lines beginning with a # are comments\n\n# This should match build.sh located anywhere.\nbuild.sh\n\n# Matches build.sh in the root\n/build.sh\n\n# Exclude all recursively\ndocs/**\n\n# Explicitly allow files excluded by other rules\n!docs/UserApi.md\n\n# Recursively exclude directories named Api\n# You can't negate files below this directory.\nsrc/**/Api/\n\n# When this file is nested under /Api (excluded above),\n# this rule is ignored because parent directory is excluded by previous rule.\n!src/**/PetApiTests.cs\n\n# Exclude a single, nested file explicitly\nsrc/Org.OpenAPITools.Test/Model/AnimalFarmTests.cs\n")),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file must exist in the root of the output directory."),Object(i.b)("p",null,"Upon first code generation, you may also pass the CLI option ",Object(i.b)("inlineCode",{parentName:"p"},"--ignore-file-override=/path/to/ignore_file")," for greater control over generated outputs. Note that this is a complete override, and will override the ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file in an output directory when regenerating code."),Object(i.b)("p",null,"Editor support for ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," files is available in IntelliJ via the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://plugins.jetbrains.com/plugin/7495--ignore"}),".ignore plugin"),"."),Object(i.b)("h2",{id:"customizing-the-generator"},"Customizing the generator"),Object(i.b)("p",null,"There are different aspects of customizing the code generator beyond just creating or modifying templates. Each language has a supporting configuration file to handle different type mappings, etc:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"$ ls -1 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/\nAbstractJavaJAXRSServerCodegen.java\nAbstractTypeScriptClientCodegen.java\n... (results omitted)\nTypeScriptAngularClientCodegen.java\nTypeScriptNodeClientCodegen.java\n")),Object(i.b)("p",null,"Each of these files creates reasonable defaults so you can get running quickly. But if you want to configure package names, prefixes, model folders, etc. you can use a json config file to pass the values."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \\\n -g java \\\n -o samples/client/petstore/java \\\n -c path/to/config.json\n")),Object(i.b)("p",null,"and ",Object(i.b)("inlineCode",{parentName:"p"},"config.json")," contains the following as an example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "apiPackage" : "petstore"\n}\n')),Object(i.b)("p",null,"You can use also ",Object(i.b)("inlineCode",{parentName:"p"},"config.yml")," with following equivalent example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),'apiPackage: "petstore"\n')),Object(i.b)("p",null,"Supported config options can be different per language. Running ",Object(i.b)("inlineCode",{parentName:"p"},"config-help -g {lang}")," will show available options.\n",Object(i.b)("strong",{parentName:"p"},"These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with ",Object(i.b)("inlineCode",{parentName:"strong"},"-p {optionName}={optionValue}")),". (If ",Object(i.b)("inlineCode",{parentName:"p"},"-p {optionName}")," does not work, please open a ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/openapitools/openapi-generator/issues/new"}),"ticket")," and we'll look into it)"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java\n")),Object(i.b)("p",null,"Output"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"CONFIG OPTIONS\n modelPackage\n package for generated models\n\n apiPackage\n package for generated api classes\n...... (results omitted)\n library\n library template (sub-template) to use:\n jersey1 - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2\n jersey2 - HTTP client: Jersey client 2.6\n feign - HTTP client: Netflix Feign 8.1.1. JSON processing: Jackson 2.6.3\n okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1\n retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)\n retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta2)\n google-api-client - HTTP client: google-api-client 1.23.0. JSON processing: Jackson 2.8.9\n rest-assured - HTTP client: rest-assured : 4.3.0. JSON processing: Gson 2.8.6. Only for Java8\n")),Object(i.b)("p",null,"Your config file for Java can look like"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "groupId":"com.my.company",\n "artifactId":"MyClient",\n "artifactVersion":"1.2.0",\n "library":"feign"\n}\n')),Object(i.b)("p",null,"Or if you prefer yaml format it can look like"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),'groupId: "com.my.company"\nartifactId: "MyClient"\nartifactVersion: "1.2.0"\nlibrary: "feign"\n')),Object(i.b)("p",null,"For all the unspecified options default values will be used."),Object(i.b)("p",null,"Another way to override default options is to extend the config class for the specific language.\nTo change, for example, the prefix for the Objective-C generated files, simply subclass the ",Object(i.b)("inlineCode",{parentName:"p"},"ObjcClientCodegen.java"),":"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-java"}),'package com.mycompany.openapitools.codegen;\n\nimport org.openapitools.codegen.languages.*;\n\npublic class MyObjcCodegen extends ObjcClientCodegen {\n static {\n PREFIX = "HELLO";\n }\n}\n')),Object(i.b)("p",null,"and specify the ",Object(i.b)("inlineCode",{parentName:"p"},"classname")," when running the generator:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"-g com.mycompany.openapitools.codegen.MyObjcCodegen\n")),Object(i.b)("p",null,"Your subclass will now be loaded and overrides the ",Object(i.b)("inlineCode",{parentName:"p"},"PREFIX")," value in the superclass."),Object(i.b)("h2",{id:"bringing-your-own-models"},"Bringing your own models"),Object(i.b)("p",null,"Sometimes you don't want a model generated. In this case, you can simply specify an import mapping to tell\nthe codegen what ",Object(i.b)("em",{parentName:"p"},"not")," to create. When doing this, every location that references a specific model will\nrefer back to your classes. Note, this may not apply to all languages..."),Object(i.b)("p",null,"To specify an import mapping, use the ",Object(i.b)("inlineCode",{parentName:"p"},"--import-mappings")," argument and specify the model-to-import logic as such:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet\n")),Object(i.b)("p",null,"Or for multiple mappings:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet,Order=my.models.MyOrder\n")),Object(i.b)("p",null,"or"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet --import-mappings Order=my.models.MyOrder\n")))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),c=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},u=function(e){var t=c(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,m=u["".concat(r,".").concat(d)]||u[d]||b[d]||i;return n?o.a.createElement(m,l({ref:t},s,{components:n})):o.a.createElement(m,l({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,r[1]=l;for(var s=2;s\n org.openapitools\n openapi-generator-maven-plugin\n ${openapi-generator-version}\n \n \n generate-client-code\n \n generate\n \n \n my-codegen\n \x3c!-- other configuration ... --\x3e\n \n \n \n \n \n org.openapitools\n my-codegen-openapi-generator\n 1.0.0\n \n \n\n")),Object(i.b)("p",null,"If you publish your artifact to a distant maven repository, do not forget to add this repository as ",Object(i.b)("inlineCode",{parentName:"p"},"pluginRepository")," for your project."),Object(i.b)("h2",{id:"selective-generation"},"Selective generation"),Object(i.b)("p",null,"You may not want to generate ",Object(i.b)("em",{parentName:"p"},"all")," models in your project. Likewise, you may want just one or two apis to be written. If that's the case, you can use system properties or ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/globals"}),"global properties")," to control the output."),Object(i.b)("p",null,"The default is generate ",Object(i.b)("em",{parentName:"p"},"everything")," supported by the specific library. Once you enable a feature, it will restrict the contents generated:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"# generate only models\n--global-property models\n\n# generate only apis\n--global-property apis\n\n# generate only supporting files\n--global-property supportingFiles\n\n# generate models and supporting files\n--global-property models,supportingFiles\n")),Object(i.b)("p",null,"To control the specific files being generated, you can pass a CSV list of what you want:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),'# generate the User and Pet models only\n--global-property models="User:Pet"\n\n# generate the User model and the supportingFile `StringUtil.java`:\n--global-property models=User,supportingFiles=StringUtil.java\n')),Object(i.b)("p",null,"To control generation of docs and tests for api and models, pass false to the option. For api, these options are ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property apiTests=false,apiDocs=false"),". For models, ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property modelTests=false,modelDocs=false"),".\nThese options default to true and don't limit the generation of the feature options listed above (like ",Object(i.b)("inlineCode",{parentName:"p"},"--global-property api"),"):"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),'# generate only models (with tests and documentation)\n--global-property models\n\n# generate only models (with tests but no documentation)\n--global-property models,modelDocs=false\n\n# generate only User and Pet models (no tests and no documentation)\n--global-property models="User:Pet",modelTests=false\n\n# generate only apis (without tests)\n--global-property apis,apiTests=false\n\n# generate only apis (modelTests option is ignored)\n--global-property apis,modelTests=false\n')),Object(i.b)("p",null,"When using selective generation, ",Object(i.b)("em",{parentName:"p"},"only")," the templates needed for the specific generation will be used."),Object(i.b)("p",null,'To skip models defined as the form parameters in "requestBody", please use ',Object(i.b)("inlineCode",{parentName:"p"},"skipFormModel")," (default to ",Object(i.b)("inlineCode",{parentName:"p"},"true"),") (this option is introduced at v3.2.2 and ",Object(i.b)("inlineCode",{parentName:"p"},"true")," by default starting from v5.x)."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"--global-property skipFormModel=true\n")),Object(i.b)("p",null,"This option will be helpful to skip model generation due to the form parameter, which is defined differently in OAS3 as there's no form parameter in OAS3"),Object(i.b)("h2",{id:"ignore-file-format"},"Ignore file format"),Object(i.b)("p",null,"OpenAPI Generator supports a ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file, similar to ",Object(i.b)("inlineCode",{parentName:"p"},".gitignore")," or ",Object(i.b)("inlineCode",{parentName:"p"},".dockerignore")," you're probably already familiar with."),Object(i.b)("p",null,"The ignore file allows for better control over overwriting existing files than the ",Object(i.b)("inlineCode",{parentName:"p"},"--skip-overwrite")," flag. With the ignore file, you can specify individual files or directories can be ignored. This can be useful, for example if you only want a subset of the generated code."),Object(i.b)("p",null,"Examples:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"# OpenAPI Generator Ignore\n# Lines beginning with a # are comments\n\n# This should match build.sh located anywhere.\nbuild.sh\n\n# Matches build.sh in the root\n/build.sh\n\n# Exclude all recursively\ndocs/**\n\n# Explicitly allow files excluded by other rules\n!docs/UserApi.md\n\n# Recursively exclude directories named Api\n# You can't negate files below this directory.\nsrc/**/Api/\n\n# When this file is nested under /Api (excluded above),\n# this rule is ignored because parent directory is excluded by previous rule.\n!src/**/PetApiTests.cs\n\n# Exclude a single, nested file explicitly\nsrc/Org.OpenAPITools.Test/Model/AnimalFarmTests.cs\n")),Object(i.b)("p",null,"The ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file must exist in the root of the output directory."),Object(i.b)("p",null,"Upon first code generation, you may also pass the CLI option ",Object(i.b)("inlineCode",{parentName:"p"},"--ignore-file-override=/path/to/ignore_file")," for greater control over generated outputs. Note that this is a complete override, and will override the ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," file in an output directory when regenerating code."),Object(i.b)("p",null,"Editor support for ",Object(i.b)("inlineCode",{parentName:"p"},".openapi-generator-ignore")," files is available in IntelliJ via the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://plugins.jetbrains.com/plugin/7495--ignore"}),".ignore plugin"),"."),Object(i.b)("h2",{id:"customizing-the-generator"},"Customizing the generator"),Object(i.b)("p",null,"There are different aspects of customizing the code generator beyond just creating or modifying templates. Each language has a supporting configuration file to handle different type mappings, etc:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"$ ls -1 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/\nAbstractJavaJAXRSServerCodegen.java\nAbstractTypeScriptClientCodegen.java\n... (results omitted)\nTypeScriptAngularClientCodegen.java\nTypeScriptNodeClientCodegen.java\n")),Object(i.b)("p",null,"Each of these files creates reasonable defaults so you can get running quickly. But if you want to configure package names, prefixes, model folders, etc. you can use a json config file to pass the values."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \\\n -g java \\\n -o samples/client/petstore/java \\\n -c path/to/config.json\n")),Object(i.b)("p",null,"and ",Object(i.b)("inlineCode",{parentName:"p"},"config.json")," contains the following as an example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "apiPackage" : "petstore"\n}\n')),Object(i.b)("p",null,"You can use also ",Object(i.b)("inlineCode",{parentName:"p"},"config.yml")," with following equivalent example:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),'apiPackage: "petstore"\n')),Object(i.b)("p",null,"Supported config options can be different per language. Running ",Object(i.b)("inlineCode",{parentName:"p"},"config-help -g {lang}")," will show available options.\n",Object(i.b)("strong",{parentName:"p"},"These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with ",Object(i.b)("inlineCode",{parentName:"strong"},"-p {optionName}={optionValue}")),". (If ",Object(i.b)("inlineCode",{parentName:"p"},"-p {optionName}")," does not work, please open a ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/openapitools/openapi-generator/issues/new"}),"ticket")," and we'll look into it)"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sh"}),"java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java\n")),Object(i.b)("p",null,"Output"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"CONFIG OPTIONS\n modelPackage\n package for generated models\n\n apiPackage\n package for generated api classes\n...... (results omitted)\n library\n library template (sub-template) to use:\n jersey1 - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2\n jersey2 - HTTP client: Jersey client 2.6\n feign - HTTP client: Netflix Feign 8.1.1. JSON processing: Jackson 2.6.3\n okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1\n retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)\n retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta2)\n google-api-client - HTTP client: google-api-client 1.23.0. JSON processing: Jackson 2.8.9\n rest-assured - HTTP client: rest-assured : 4.3.0. JSON processing: Gson 2.8.6. Only for Java8\n")),Object(i.b)("p",null,"Your config file for Java can look like"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "groupId":"com.my.company",\n "artifactId":"MyClient",\n "artifactVersion":"1.2.0",\n "library":"feign"\n}\n')),Object(i.b)("p",null,"Or if you prefer yaml format it can look like"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),'groupId: "com.my.company"\nartifactId: "MyClient"\nartifactVersion: "1.2.0"\nlibrary: "feign"\n')),Object(i.b)("p",null,"For all the unspecified options default values will be used."),Object(i.b)("p",null,"Another way to override default options is to extend the config class for the specific language.\nTo change, for example, the prefix for the Objective-C generated files, simply subclass the ",Object(i.b)("inlineCode",{parentName:"p"},"ObjcClientCodegen.java"),":"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-java"}),'package com.mycompany.openapitools.codegen;\n\nimport org.openapitools.codegen.languages.*;\n\npublic class MyObjcCodegen extends ObjcClientCodegen {\n static {\n PREFIX = "HELLO";\n }\n}\n')),Object(i.b)("p",null,"and specify the ",Object(i.b)("inlineCode",{parentName:"p"},"classname")," when running the generator:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"-g com.mycompany.openapitools.codegen.MyObjcCodegen\n")),Object(i.b)("p",null,"Your subclass will now be loaded and overrides the ",Object(i.b)("inlineCode",{parentName:"p"},"PREFIX")," value in the superclass."),Object(i.b)("h2",{id:"bringing-your-own-models"},"Bringing your own models"),Object(i.b)("p",null,"Sometimes you don't want a model generated. In this case, you can simply specify an import mapping to tell\nthe codegen what ",Object(i.b)("em",{parentName:"p"},"not")," to create. When doing this, every location that references a specific model will\nrefer back to your classes. Note, this may not apply to all languages..."),Object(i.b)("p",null,"To specify an import mapping, use the ",Object(i.b)("inlineCode",{parentName:"p"},"--import-mappings")," argument and specify the model-to-import logic as such:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet\n")),Object(i.b)("p",null,"Or for multiple mappings:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet,Order=my.models.MyOrder\n")),Object(i.b)("p",null,"or"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"--import-mappings Pet=my.models.MyPet --import-mappings Order=my.models.MyOrder\n")))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m}));var a=n(0),o=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),c=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=c(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),b=c(n),d=a,m=b["".concat(r,".").concat(d)]||b[d]||u[d]||i;return n?o.a.createElement(m,l({ref:t},s,{components:n})):o.a.createElement(m,l({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,r[1]=l;for(var s=2;s"," Value)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")))),Object(l.b)("h2",{id:"import-mapping"},"IMPORT MAPPING"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Imports"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"instantiation-types"},"INSTANTIATION TYPES"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Instantiated By"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"language-primitives"},"LANGUAGE PRIMITIVES"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"double"),Object(l.b)("li",null,"float"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"long"),Object(l.b)("li",null,"std::string")),Object(l.b)("h2",{id:"reserved-words"},"RESERVED WORDS"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"alignas"),Object(l.b)("li",null,"alignof"),Object(l.b)("li",null,"and"),Object(l.b)("li",null,"and_eq"),Object(l.b)("li",null,"asm"),Object(l.b)("li",null,"auto"),Object(l.b)("li",null,"bitand"),Object(l.b)("li",null,"bitor"),Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"break"),Object(l.b)("li",null,"case"),Object(l.b)("li",null,"catch"),Object(l.b)("li",null,"char"),Object(l.b)("li",null,"char16_t"),Object(l.b)("li",null,"char32_t"),Object(l.b)("li",null,"class"),Object(l.b)("li",null,"compl"),Object(l.b)("li",null,"concept"),Object(l.b)("li",null,"const"),Object(l.b)("li",null,"const_cast"),Object(l.b)("li",null,"constexpr"),Object(l.b)("li",null,"continue"),Object(l.b)("li",null,"decltype"),Object(l.b)("li",null,"default"),Object(l.b)("li",null,"delete"),Object(l.b)("li",null,"do"),Object(l.b)("li",null,"double"),Object(l.b)("li",null,"dynamic_cast"),Object(l.b)("li",null,"else"),Object(l.b)("li",null,"enum"),Object(l.b)("li",null,"explicit"),Object(l.b)("li",null,"export"),Object(l.b)("li",null,"extern"),Object(l.b)("li",null,"false"),Object(l.b)("li",null,"float"),Object(l.b)("li",null,"for"),Object(l.b)("li",null,"friend"),Object(l.b)("li",null,"goto"),Object(l.b)("li",null,"if"),Object(l.b)("li",null,"inline"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"linux"),Object(l.b)("li",null,"long"),Object(l.b)("li",null,"mutable"),Object(l.b)("li",null,"namespace"),Object(l.b)("li",null,"new"),Object(l.b)("li",null,"noexcept"),Object(l.b)("li",null,"not"),Object(l.b)("li",null,"not_eq"),Object(l.b)("li",null,"nullptr"),Object(l.b)("li",null,"operator"),Object(l.b)("li",null,"or"),Object(l.b)("li",null,"or_eq"),Object(l.b)("li",null,"private"),Object(l.b)("li",null,"protected"),Object(l.b)("li",null,"public"),Object(l.b)("li",null,"register"),Object(l.b)("li",null,"reinterpret_cast"),Object(l.b)("li",null,"requires"),Object(l.b)("li",null,"return"),Object(l.b)("li",null,"short"),Object(l.b)("li",null,"signed"),Object(l.b)("li",null,"sizeof"),Object(l.b)("li",null,"static"),Object(l.b)("li",null,"static_assert"),Object(l.b)("li",null,"static_cast"),Object(l.b)("li",null,"struct"),Object(l.b)("li",null,"switch"),Object(l.b)("li",null,"template"),Object(l.b)("li",null,"this"),Object(l.b)("li",null,"thread_local"),Object(l.b)("li",null,"throw"),Object(l.b)("li",null,"true"),Object(l.b)("li",null,"try"),Object(l.b)("li",null,"typedef"),Object(l.b)("li",null,"typeid"),Object(l.b)("li",null,"typename"),Object(l.b)("li",null,"union"),Object(l.b)("li",null,"unsigned"),Object(l.b)("li",null,"using"),Object(l.b)("li",null,"virtual"),Object(l.b)("li",null,"void"),Object(l.b)("li",null,"volatile"),Object(l.b)("li",null,"wchar_t"),Object(l.b)("li",null,"while"),Object(l.b)("li",null,"xor"),Object(l.b)("li",null,"xor_eq")),Object(l.b)("h2",{id:"feature-set"},"FEATURE SET"),Object(l.b)("h3",{id:"client-modification-feature"},"Client Modification Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Authorizations"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"UserAgent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MockServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"data-type-feature"},"Data Type Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int32"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int64"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Float"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Double"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Decimal"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"String"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Byte"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Binary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Boolean"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Date"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"DateTime"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"File"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Array"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Maps"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormat"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormatMulti"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Enum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"documentation-feature"},"Documentation Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Readme"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Model"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Api"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"global-feature"},"Global Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Host"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Info"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Schemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PartialSchemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Consumes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Produces"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ExternalDocumentation"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Examples"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XMLStructureDefinitions"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MultiServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterizedServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterStyling"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Callbacks"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"LinkObjects"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"parameter-feature"},"Parameter Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Path"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Query"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Header"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Body"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormUnencoded"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormMultipart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Cookie"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"schema-support-feature"},"Schema Support Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Simple"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Composite"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Polymorphism"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Union"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"security-feature"},"Security Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasicAuth"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ApiKey"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenIDConnect"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BearerToken"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Implicit"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_ClientCredentials"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_AuthorizationCode"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))),Object(l.b)("h3",{id:"wire-format-feature"},"Wire Format Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"JSON"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XML"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PROTOBUF"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))))}i.isMDXComponent=!0},312:function(t,e,a){"use strict";a.d(e,"a",(function(){return p})),a.d(e,"b",(function(){return m}));var n=a(0),b=a.n(n);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},p=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},d=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),p=i(a),d=n,m=p["".concat(r,".").concat(d)]||p[d]||u[d]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=d;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j"," Value)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"true")))),Object(l.b)("h2",{id:"import-mapping"},"IMPORT MAPPING"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Imports"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"instantiation-types"},"INSTANTIATION TYPES"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Instantiated By"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"language-primitives"},"LANGUAGE PRIMITIVES"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"double"),Object(l.b)("li",null,"float"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"long"),Object(l.b)("li",null,"std::string")),Object(l.b)("h2",{id:"reserved-words"},"RESERVED WORDS"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"alignas"),Object(l.b)("li",null,"alignof"),Object(l.b)("li",null,"and"),Object(l.b)("li",null,"and_eq"),Object(l.b)("li",null,"asm"),Object(l.b)("li",null,"auto"),Object(l.b)("li",null,"bitand"),Object(l.b)("li",null,"bitor"),Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"break"),Object(l.b)("li",null,"case"),Object(l.b)("li",null,"catch"),Object(l.b)("li",null,"char"),Object(l.b)("li",null,"char16_t"),Object(l.b)("li",null,"char32_t"),Object(l.b)("li",null,"class"),Object(l.b)("li",null,"compl"),Object(l.b)("li",null,"concept"),Object(l.b)("li",null,"const"),Object(l.b)("li",null,"const_cast"),Object(l.b)("li",null,"constexpr"),Object(l.b)("li",null,"continue"),Object(l.b)("li",null,"decltype"),Object(l.b)("li",null,"default"),Object(l.b)("li",null,"delete"),Object(l.b)("li",null,"do"),Object(l.b)("li",null,"double"),Object(l.b)("li",null,"dynamic_cast"),Object(l.b)("li",null,"else"),Object(l.b)("li",null,"enum"),Object(l.b)("li",null,"explicit"),Object(l.b)("li",null,"export"),Object(l.b)("li",null,"extern"),Object(l.b)("li",null,"false"),Object(l.b)("li",null,"float"),Object(l.b)("li",null,"for"),Object(l.b)("li",null,"friend"),Object(l.b)("li",null,"goto"),Object(l.b)("li",null,"if"),Object(l.b)("li",null,"inline"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"linux"),Object(l.b)("li",null,"long"),Object(l.b)("li",null,"mutable"),Object(l.b)("li",null,"namespace"),Object(l.b)("li",null,"new"),Object(l.b)("li",null,"noexcept"),Object(l.b)("li",null,"not"),Object(l.b)("li",null,"not_eq"),Object(l.b)("li",null,"nullptr"),Object(l.b)("li",null,"operator"),Object(l.b)("li",null,"or"),Object(l.b)("li",null,"or_eq"),Object(l.b)("li",null,"private"),Object(l.b)("li",null,"protected"),Object(l.b)("li",null,"public"),Object(l.b)("li",null,"register"),Object(l.b)("li",null,"reinterpret_cast"),Object(l.b)("li",null,"requires"),Object(l.b)("li",null,"return"),Object(l.b)("li",null,"short"),Object(l.b)("li",null,"signed"),Object(l.b)("li",null,"sizeof"),Object(l.b)("li",null,"static"),Object(l.b)("li",null,"static_assert"),Object(l.b)("li",null,"static_cast"),Object(l.b)("li",null,"struct"),Object(l.b)("li",null,"switch"),Object(l.b)("li",null,"template"),Object(l.b)("li",null,"this"),Object(l.b)("li",null,"thread_local"),Object(l.b)("li",null,"throw"),Object(l.b)("li",null,"true"),Object(l.b)("li",null,"try"),Object(l.b)("li",null,"typedef"),Object(l.b)("li",null,"typeid"),Object(l.b)("li",null,"typename"),Object(l.b)("li",null,"union"),Object(l.b)("li",null,"unsigned"),Object(l.b)("li",null,"using"),Object(l.b)("li",null,"virtual"),Object(l.b)("li",null,"void"),Object(l.b)("li",null,"volatile"),Object(l.b)("li",null,"wchar_t"),Object(l.b)("li",null,"while"),Object(l.b)("li",null,"xor"),Object(l.b)("li",null,"xor_eq")),Object(l.b)("h2",{id:"feature-set"},"FEATURE SET"),Object(l.b)("h3",{id:"client-modification-feature"},"Client Modification Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Authorizations"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"UserAgent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MockServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"data-type-feature"},"Data Type Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int32"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int64"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Float"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Double"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Decimal"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"String"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Byte"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Binary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Boolean"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Date"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"DateTime"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"File"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Array"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Maps"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormat"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormatMulti"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Enum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"documentation-feature"},"Documentation Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Readme"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Model"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Api"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"global-feature"},"Global Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Host"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Info"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Schemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PartialSchemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Consumes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Produces"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ExternalDocumentation"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Examples"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XMLStructureDefinitions"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MultiServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterizedServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterStyling"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Callbacks"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"LinkObjects"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"parameter-feature"},"Parameter Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Path"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Query"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Header"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Body"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormUnencoded"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormMultipart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Cookie"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"schema-support-feature"},"Schema Support Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Simple"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Composite"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Polymorphism"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Union"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"security-feature"},"Security Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasicAuth"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ApiKey"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenIDConnect"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BearerToken"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Implicit"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_ClientCredentials"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_AuthorizationCode"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))),Object(l.b)("h3",{id:"wire-format-feature"},"Wire Format Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"JSON"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XML"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PROTOBUF"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))))}i.isMDXComponent=!0},312:function(t,e,a){"use strict";a.d(e,"a",(function(){return p})),a.d(e,"b",(function(){return m}));var n=a(0),b=a.n(n);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},p=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},d=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),p=i(a),d=n,m=p["".concat(r,".").concat(d)]||p[d]||u[d]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=d;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j - + - + diff --git a/blog/index.html b/blog/index.html index 01e88193426..9fe3a5a4426 100644 --- a/blog/index.html +++ b/blog/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/cf67c7b0.05fbc926.js b/cf67c7b0.05fbc926.js new file mode 100644 index 00000000000..1ae4e7bb66e --- /dev/null +++ b/cf67c7b0.05fbc926.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{269:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return l})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return c}));var a=n(1),i=n(9),r=(n(0),n(312)),o={id:"templating",title:"Using Templates"},l={id:"templating",title:"Using Templates",description:"It's easy to work with templates for codegen!",source:"@site/../docs/templating.md",permalink:"/docs/templating",editUrl:"https://github.com/OpenAPITools/openapi-generator/edit/master/website/../docs/templating.md",lastUpdatedBy:"William Cheng",lastUpdatedAt:1650157931,sidebar:"docs",previous:{title:"File post-processing",permalink:"/docs/file-post-processing"},next:{title:"Customization",permalink:"/docs/customization"}},s=[{value:"Modifying Templates",id:"modifying-templates",children:[{value:"Retrieving Templates",id:"retrieving-templates",children:[]},{value:"Custom Logic",id:"custom-logic",children:[]},{value:"Custom Engines",id:"custom-engines",children:[]}]},{value:"Structures",id:"structures",children:[{value:"Operations",id:"operations",children:[]},{value:"Models",id:"models",children:[]},{value:"supportingFiles",id:"supportingfiles",children:[]}]},{value:"Variables",id:"variables",children:[]},{value:"Mustache Lambdas",id:"mustache-lambdas",children:[]},{value:"Extensions",id:"extensions",children:[{value:"All generators (core)",id:"all-generators-core",children:[]},{value:"ObjC",id:"objc",children:[]},{value:"Java (Feign)",id:"java-feign",children:[]},{value:"x-content-type",id:"x-content-type",children:[]},{value:"Rust-server",id:"rust-server",children:[]},{value:"MySQL Schema",id:"mysql-schema",children:[]}]},{value:"Mustache Tips",id:"mustache-tips",children:[{value:"First/Last",id:"firstlast",children:[]},{value:"This",id:"this",children:[]},{value:"Index",id:"index",children:[]}]}],p={rightToc:s};function c(e){var t=e.components,n=Object(i.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"It's easy to work with templates for codegen!"),Object(r.b)("p",null,"For maybe 90% of use cases, you will only need to modify the mustache template files to create your own custom generated code. If you need to include additional files in your generated output, manipulate the OpenAPI document inputs, or implement your own vendor extensions or other logic, you'll want to read ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/customization"}),"customization")," after you read this document. Be sure to start here first, because templating is the easier concept and you'll need it for more advanced use cases."),Object(r.b)("p",null,"The generator workflow has ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages"}),"transforming logic")," as well as templates for each generation of code."),Object(r.b)("p",null,"Each generator will create a data structure from the OpenAPI document; OpenAPI 2.0 and OpenAPI 3.x documents are normalized into the same API model within the generator. This model is then applied to the templates. While generators do not need to perform transformations, it's often necessary in order to add more advanced support for your language or framework. You may need to refer to the generator implementation to understand some of the logic while creating or customizing templates (see ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java"}),"ScalaFinchServerCodegen.java")," for an advanced example)."),Object(r.b)("p",null,"The transform logic needs to implement ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/openapitools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java"}),"CodegenConfig.java")," and is most easily done by extending ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/openapitools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java"}),"DefaultCodegen.java"),". Take a look at the various implementations as a guideline while the instructions get more complete."),Object(r.b)("h2",{id:"modifying-templates"},"Modifying Templates"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"OpenAPI Generator applies user-defined templates via options: "),Object(r.b)("ul",{parentName:"blockquote"},Object(r.b)("li",{parentName:"ul"},"CLI: ",Object(r.b)("inlineCode",{parentName:"li"},"-t/--template")," CLI options"),Object(r.b)("li",{parentName:"ul"},"Maven Plugin: ",Object(r.b)("inlineCode",{parentName:"li"},"templateDirectory")),Object(r.b)("li",{parentName:"ul"},"Gradle Plugin: ",Object(r.b)("inlineCode",{parentName:"li"},"templateDir")))),Object(r.b)("p",null,"Built-in templates are written in Mustache and processed by ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/samskivert/jmustache"}),"jmustache"),". Beginning with version 4.0.0, we support experimental Handlebars and user-defined template engines via plugins."),Object(r.b)("p",null,"OpenAPI Generator supports user-defined templates. This approach is often the easiest when creating a custom template. Our generators implement a combination of language and framework features, and it's fully possible to use an existing generator to implement a custom template for a different framework. Suppose you have internal utilities which you'd like to incorporate into generated code (e.g. logging, monitoring, fault-handling)... this is easy to add via custom templates."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},Object(r.b)("strong",{parentName:"p"},"Note:")," You cannot use this approach to create new templates, only override existing ones. If you'd like to create a new generator to contribute back to the project, see ",Object(r.b)("inlineCode",{parentName:"p"},"new.sh")," in the repository root. If you'd like to create a private generator for more templating control, see the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/customization"}),"customization")," docs.")),Object(r.b)("p",null,"OpenAPI Generator not only supports local files for templating, but also templates defined on the classpath. This is a great option if you want to reuse templates across multiple projects. To load a template via classpath, you'll need to generate a little differently. For example, if you've created an artifact called ",Object(r.b)("inlineCode",{parentName:"p"},"template-classpath-example")," which contains extended templates for the ",Object(r.b)("inlineCode",{parentName:"p"},"htmlDocs")," generator with the following structure:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),"\u2514\u2500\u2500 src\n \u251c\u2500\u2500 main\n \u2502\xa0\xa0 \u251c\u2500\u2500 java\n \u2502\xa0\xa0 \u2514\u2500\u2500 resources\n \u2502\xa0\xa0 \u2514\u2500\u2500 templates\n \u2502\xa0\xa0 \u2514\u2500\u2500 htmlDocs\n \u2502\xa0\xa0 \u251c\u2500\u2500 index.mustache\n \u2502\xa0\xa0 \u2514\u2500\u2500 style.css.mustache\n")),Object(r.b)("p",null,"You can define your classpath to contain your JAR and the openapi-generator-cli ",Object(r.b)("em",{parentName:"p"},"fat jar"),", then invoke main class ",Object(r.b)("inlineCode",{parentName:"p"},"org.openapitools.codegen.OpenAPIGenerator"),". For instance,"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"java -cp /path/totemplate-classpath-example-1.0-SNAPSHOT.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \\\n org.openapitools.codegen.OpenAPIGenerator generate \\\n -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml \\\n -g html -o template-example -t templates/htmlDocs\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"NOTE")," Running your custom generator in the example above requires adding it to the classpath. This differs on ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html"}),"Windows")," slightly from ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"}),"unix"),"."),Object(r.b)("p",null,"Take note that our template directory is relative to the resource directory of the JAR defined on the classpath."),Object(r.b)("h3",{id:"retrieving-templates"},"Retrieving Templates"),Object(r.b)("p",null,"You will need to find and retrieve the templates for your desired generator in order to redefine structures, documentation, or API logic. We cover template customization in the following sections."),Object(r.b)("p",null,"In OpenAPI Generator 5.0 and later, you can use the CLI command ",Object(r.b)("inlineCode",{parentName:"p"},"author template")," to extract embedded templates for your target generator. For example:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),"openapi-generator author template -g java --library webclient\n")),Object(r.b)("p",null,"For OpenAPI Generator versions prior to 5.0, you will want to find the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources"}),"resources directory")," for the generator you want to extend. This is generally easy to find as directories commonly follow the convention of ",Object(r.b)("inlineCode",{parentName:"p"},"resources/"),". In cases where you're unsure, you will need to find the ",Object(r.b)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," assignment in your desired generator. This is almost always assigned in the constructor of the generator class. The C# .Net Core generator assigns this as:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'embeddedTemplateDir = templateDir = "csharp-netcore";\n')),Object(r.b)("p",null,"These templates are in our source repository at ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp-netcore"}),"modules/openapi-generator/src/main/resources/csharp-netcore"),". Be sure to select the tag or branch for the version of OpenAPI Generator you're using before grabbing the templates."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"NOTE")," If you have specific logic you'd like to modify such as modifying the generated README, you ",Object(r.b)("em",{parentName:"p"},"only")," need to pull and modify this individual template. OpenAPI Generator will lookup templates in this order:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"User customized library path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"custom_template/libraries/feign/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"User customized generator top-level path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"custom_template/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Embedded library path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/Java/libraries/feign/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Embedded top-level path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/Java/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Common embedded path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/_common/model.mustache"),")")),Object(r.b)("h3",{id:"custom-logic"},"Custom Logic"),Object(r.b)("p",null,"For this example, let's modify a Java client to use AOP via ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/jcabi/jcabi-aspects"}),"jcabi/jcabi-aspects"),". We'll log API method execution at the ",Object(r.b)("inlineCode",{parentName:"p"},"INFO")," level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating."),Object(r.b)("p",null,"The Java generator supports a ",Object(r.b)("inlineCode",{parentName:"p"},"library"),' option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the ',Object(r.b)("inlineCode",{parentName:"p"},"library")," option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name."),Object(r.b)("p",null,"To get started, we will need to copy our target generator's directory in full."),Object(r.b)("p",null,"The directory will be located under ",Object(r.b)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/{generator}"),". In general, the generator directory matches the generator name (what you would pass to the ",Object(r.b)("inlineCode",{parentName:"p"},"generator")," option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the ",Object(r.b)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," option in your target generator's implementation."),Object(r.b)("p",null,"If you've already cloned openapi-generator, find and copy the ",Object(r.b)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/Java")," directory. If you have the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/sindresorhus/refined-github"}),"Refined GitHub"),' Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master:'),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"mkdir -p ~/.openapi-generator/templates/ && cd $_\ncurl -L https://api.github.com/repos/OpenAPITools/openapi-generator/tarball | tar xz\nmv `ls`/modules/openapi-generator/src/main/resources/Java ./Java\n\\rm -rf OpenAPITools-openapi-generator-*\ncd Java\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Optional"),": Before modifying your templates, you may want to ",Object(r.b)("inlineCode",{parentName:"p"},"git init && git add . && git commit -am 'initial'")," so you can easily revert to the base templates."),Object(r.b)("p",null,"At this point, you have ",Object(r.b)("em",{parentName:"p"},"every")," Java library's template locally. Let's delete all libraries except the ",Object(r.b)("inlineCode",{parentName:"p"},"resteasy")," library we'll be extending:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"ls -d libraries/* | grep -v resteasy | xargs rm -rf\n")),Object(r.b)("p",null,"Execute ",Object(r.b)("inlineCode",{parentName:"p"},"tree")," in this Java directory and inspect the mustache files and directory structure. You'll notice there are quite a few templates in the directory root, but extending this root to support resteasy only requires modifying a handful of files:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"tree libraries/resteasy/\nlibraries/resteasy/\n\u251c\u2500\u2500 ApiClient.mustache\n\u251c\u2500\u2500 JSON.mustache\n\u251c\u2500\u2500 api.mustache\n\u251c\u2500\u2500 build.gradle.mustache\n\u251c\u2500\u2500 build.sbt.mustache\n\u2514\u2500\u2500 pom.mustache\n\n0 directories, 6 files\n")),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"NOTE: Some generators may be sensitive to ",Object(r.b)("em",{parentName:"p"},"which")," files exist. If you're concerned with redundant files like ",Object(r.b)("inlineCode",{parentName:"p"},"pom.mustache")," and ",Object(r.b)("inlineCode",{parentName:"p"},"build.sbt.mustache"),", you can try deleting them. If the generator you're customizing fails at runtime, just ",Object(r.b)("inlineCode",{parentName:"p"},"touch")," these files to create an empty file.")),Object(r.b)("p",null,"First, let's add our new dependency to ",Object(r.b)("inlineCode",{parentName:"p"},"libraries/resteasy/build.gradle.mustache"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),'diff --git a/libraries/resteasy/build.gradle.mustache b/libraries/resteasy/build.gradle.mustache\nindex 3b40702..a6d12e0 100644\n--- a/libraries/resteasy/build.gradle.mustache\n+++ b/libraries/resteasy/build.gradle.mustache\n@@ -134,6 +134,7 @@ ext {\n }\n\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "org.jboss.resteasy:resteasy-client:$resteasy_version"\n compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"\n\n')),Object(r.b)("p",null,"Then, we'll add the necessary import to ",Object(r.b)("inlineCode",{parentName:"p"},"api.mustache"),". This file is the template which becomes the API invoking class (e.g. ",Object(r.b)("inlineCode",{parentName:"p"},"PetApi")," or ",Object(r.b)("inlineCode",{parentName:"p"},"StoreApi"),")."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex a4d0f9f..49b17c7 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -1,5 +1,6 @@\n package {{package}};\n\n+import com.jcabi.aspects.Loggable;\n import {{invokerPackage}}.ApiException;\n import {{invokerPackage}}.ApiClient;\n import {{invokerPackage}}.Configuration;\n\n")),Object(r.b)("p",null,"Next, we'll find the code which generates API methods. You'll see ",Object(r.b)("inlineCode",{parentName:"p"},"{{#operations}}{{#operation}}"),' which is a mustache "loop" which executes the template logic if the model applied to the template has an ',Object(r.b)("inlineCode",{parentName:"p"},"operations")," array, and a non-null ",Object(r.b)("inlineCode",{parentName:"p"},"operation")," instance in that array. You can pass ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")," when generating via CLI to inspect the full object model."),Object(r.b)("p",null,"Further down in ",Object(r.b)("inlineCode",{parentName:"p"},"api.mustache"),", find implementation of the method call, and add the ",Object(r.b)("inlineCode",{parentName:"p"},"@Loggable")," annotation. This template is easy because it has a single method implementation."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex 49b17c7..16ee191 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -57,6 +57,7 @@ public class {{classname}} {\n {{#isDeprecated}}\n @Deprecated\n {{/isDeprecated}}\n+ @Loggable(Loggable.INFO)\n public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {\n Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};\n {{#allParams}}{{#required}}\n\n")),Object(r.b)("p",null,"Finally, because our new dependency relies on AspectJ and code weaving, let's modify the ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle.mustache")," again to set this up."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),'diff --git a/build.gradle.mustache b/build.gradle.mustache\nindex 04a9d55..7a93c50 100644\n--- a/build.gradle.mustache\n+++ b/build.gradle.mustache\n@@ -1,5 +1,6 @@\n apply plugin: \'idea\'\n apply plugin: \'eclipse\'\n+apply plugin: \'aspectj\'\n\n group = \'{{groupId}}\'\n version = \'{{artifactVersion}}\'\n@@ -12,6 +13,7 @@ buildscript {\n dependencies {\n classpath \'com.android.tools.build:gradle:2.3.+\'\n classpath \'com.github.dcendents:android-maven-gradle-plugin:1.5\'\n+ classpath "net.uberfoo.gradle:gradle-aspectj:2.2"\n }\n }\n\n@@ -140,9 +142,18 @@ ext {\n jersey_version = "1.19.4"\n jodatime_version = "2.9.9"\n junit_version = "4.13"\n+ aspectjVersion = \'1.9.0\'\n }\n\n+sourceCompatibility = \'1.8\'\n+targetCompatibility = \'1.8\'\n+\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n+ aspectpath "com.jcabi:jcabi-aspects:0.22.6"\n+ // usually, client code leaves logging implementation to the consumer code\n+ compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.2"\n+ compile "org.apache.logging.log4j:log4j-core:2.8.2"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "com.sun.jersey:jersey-client:$jersey_version"\n compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"\n\n')),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"NOTE: This example includes log4j-slf4j-impl to demonstrate that our new code is working. Generally you'll want to leave logging implementations up to your consumers.")),Object(r.b)("p",null,"And because the java client generates with an outdated Gradle 2.6, let's update the gradle version in the default template (",Object(r.b)("inlineCode",{parentName:"p"},"Java/gradle-wrapper.properties.mustache"),"):"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/gradle-wrapper.properties.mustache b/gradle-wrapper.properties.mustache\nindex b7a3647..3d9d088 100644\n--- a/gradle-wrapper.properties.mustache\n+++ b/gradle-wrapper.properties.mustache\n@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\n distributionPath=wrapper/dists\n zipStoreBase=GRADLE_USER_HOME\n zipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-2.6-bin.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-4.8-bin.zip\n\n")),Object(r.b)("p",null,"Now we're ready to generate the client with our simple changes. When we pass the template directory option to our toolset, we ",Object(r.b)("em",{parentName:"p"},"must")," pass the generator's root directory and ",Object(r.b)("em",{parentName:"p"},"not")," the library-only directory."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g java --library resteasy \\\n -t ~/.openapi-generator/templates/Java \\\n -o ~/.openapi-generator/example \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml\n")),Object(r.b)("p",null,"Make sure your custom template compiles:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"cd ~/.openapi-generator/example\ngradle assemble\n# or, regenerate the wrapper\ngradle wrapper --gradle-version 4.8 --distribution-type all\n./gradlew assemble\n")),Object(r.b)("p",null,"You should see a log message showing our added dependency being downloaded:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-text"}),"\u2026\nDownload https://jcenter.bintray.com/com/jcabi/jcabi-aspects/0.22.6/jcabi-aspects-0.22.6.pom\n\u2026\n")),Object(r.b)("p",null,"And for the sake of verifying our AOP modifications work, let's create a ",Object(r.b)("inlineCode",{parentName:"p"},"src/main/resources/log4j2.properties")," file in our new client code:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-properties"}),"status = error\ndest = err\nname = PropertiesConfig\n\nproperty.filename = target/rolling/rollingtest.log\n\nfilter.threshold.type = ThresholdFilter\nfilter.threshold.level = debug\n\nappender.console.type = Console\nappender.console.name = STDOUT\nappender.console.layout.type = PatternLayout\nappender.console.layout.pattern = %m%n\nappender.console.filter.threshold.type = ThresholdFilter\nappender.console.filter.threshold.level = error\n\nappender.rolling.type = RollingFile\nappender.rolling.name = RollingFile\nappender.rolling.fileName = ${filename}\nappender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz\nappender.rolling.layout.type = PatternLayout\nappender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n\nappender.rolling.policies.type = Policies\nappender.rolling.policies.time.type = TimeBasedTriggeringPolicy\nappender.rolling.policies.time.interval = 2\nappender.rolling.policies.time.modulate = true\nappender.rolling.policies.size.type = SizeBasedTriggeringPolicy\nappender.rolling.policies.size.size=100MB\nappender.rolling.strategy.type = DefaultRolloverStrategy\nappender.rolling.strategy.max = 5\n\nlogger.rolling.name = org.openapitools.client.api.PetApi\nlogger.rolling.level = debug\nlogger.rolling.additivity = false\nlogger.rolling.appenderRef.rolling.ref = RollingFile\n\nrootLogger.level = info\nrootLogger.appenderRef.stdout.ref = STDOUT\n")),Object(r.b)("p",null,"Execute ",Object(r.b)("inlineCode",{parentName:"p"},"./gradlew build")," and then ",Object(r.b)("inlineCode",{parentName:"p"},"cat target/rolling/rollingtest.log"),". You should see messages logged for every call in PetApi with a stubbed unit test."),Object(r.b)("p",null,"Congratulations! You've now modified one of the built-in templates to meet your client code's needs."),Object(r.b)("p",null,"Adding/modifying template logic simply requires a little bit of ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://mustache.github.io/"}),"mustache"),", for which you can use existing templates as a guide."),Object(r.b)("h3",{id:"custom-engines"},"Custom Engines"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Custom template engine support is ",Object(r.b)("em",{parentName:"p"},"experimental"))),Object(r.b)("p",null,"If Mustache or the experimental Handlebars engines don't suit your needs, you can define an adapter to your templating engine of choice. To do this, you'll need to define a new project which consumes the ",Object(r.b)("inlineCode",{parentName:"p"},"openapi-generator-core")," artifact, and at a minimum implement ",Object(r.b)("inlineCode",{parentName:"p"},"TemplatingEngineAdapter"),"."),Object(r.b)("p",null,"This example:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"creates an adapter providing the fundamental logic to compile ",Object(r.b)("a",Object(a.a)({parentName:"li"},{href:"https://pebbletemplates.io"}),"Pebble Templates")),Object(r.b)("li",{parentName:"ul"},"will be implemented in Kotlin to demonstrate ServiceLoader configuration specific to Kotlin (Java will be similar)"),Object(r.b)("li",{parentName:"ul"},"requires Gradle 5.0+"),Object(r.b)("li",{parentName:"ul"},"provides project setup instructions for IntelliJ")),Object(r.b)("p",null,"To begin, create a ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.jetbrains.com/help/idea/getting-started-with-gradle.html"}),"new Gradle project")," with Kotlin support. To do this, go to ",Object(r.b)("inlineCode",{parentName:"p"},"File")," \u279e ",Object(r.b)("inlineCode",{parentName:"p"},"New")," \u279e ",Object(r.b)("inlineCode",{parentName:"p"},"Project"),', choose "Gradle" and "Kotlin". Specify groupId ',Object(r.b)("inlineCode",{parentName:"p"},"org.openapitools.examples")," and artifactId ",Object(r.b)("inlineCode",{parentName:"p"},"pebble-template-adapter"),"."),Object(r.b)("p",null,"Ensure the new project uses Gradle 5.0. Navigate to the newly created directory and execute:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"gradle wrapper --gradle-version 5.0\n")),Object(r.b)("p",null,"In ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle"),", we'll add a dependency for OpenAPI Tools core which defines the interface and an abstract helper type for implementing the adapter. We'll also pull in the Pebble artifact. We'll be evaluating this new artifact locally, so we'll also add the Maven plugin for installing to the local maven repository. We'll also create a fatjar using the ",Object(r.b)("inlineCode",{parentName:"p"},"shadow")," plugin to simplify our classpath."),Object(r.b)("p",null,"Modifications to the new project's ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle")," should be made in the ",Object(r.b)("inlineCode",{parentName:"p"},"plugins")," and ",Object(r.b)("inlineCode",{parentName:"p"},"dependencies")," nodes:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),' plugins {\n id \'org.jetbrains.kotlin.jvm\' version \'1.3.11\'\n id "com.github.johnrengelman.shadow" version "5.0.0"\n }\n\n dependencies {\n compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"\n compile "org.openapitools:openapi-generator-core:4.0.0-SNAPSHOT"\n compile "io.pebbletemplates:pebble:3.0.8"\n }\n')),Object(r.b)("p",null,"The above configuration for the ",Object(r.b)("inlineCode",{parentName:"p"},"shadow")," plugin is strictly optional. It is not needed, for instance, if you plan to publish your adapter and consume it via the Maven or Gradle plugins."),Object(r.b)("p",null,"Next, create a new class file called ",Object(r.b)("inlineCode",{parentName:"p"},"PebbleTemplateEngineAdapter")," under ",Object(r.b)("inlineCode",{parentName:"p"},"src/kotlin"),". We'll define the template adapter's name as ",Object(r.b)("inlineCode",{parentName:"p"},"pebble")," and we'll also list this as the only supported file extension. We'll implement the adapter by extending ",Object(r.b)("inlineCode",{parentName:"p"},"AbstractTemplatingEngineAdapter"),", which includes reusable logic, such as retrieving a list of all possible template names for our provided template extensions(s)."),Object(r.b)("p",null,"The class in its simplest form looks like this (with inline comments):"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-kotlin"}),'// Allows specifying engine by class name\n// e.g. -e org.openapitools.examples.templating.PebbleTemplateAdapter\n@file:JvmName("PebbleTemplateAdapter")\npackage org.openapitools.examples.templating\n\n// imports\n\nclass PebbleTemplateAdapter : AbstractTemplatingEngineAdapter() {\n // initialize the template compilation engine\n private val engine: PebbleEngine = PebbleEngine.Builder()\n .cacheActive(false)\n .loader(DelegatingLoader(listOf(FileLoader(), ClasspathLoader())))\n .build()\n\n // allows targeting engine by id/name: -e pebble\n override fun getIdentifier(): String = "pebble"\n\n override fun compileTemplate(\n generator: TemplatingGenerator?,\n bundle: MutableMap?,\n templateFile: String?\n ): String {\n // This will convert, for example, model.mustache to model.pebble\n val modifiedTemplate = this.getModifiedFileLocation(templateFile).first()\n\n // Uses generator built-in template resolution strategy to find the full template file\n val filePath = generator?.getFullTemplatePath(modifiedTemplate)\n\n val writer = StringWriter()\n // Conditionally writes out the template if found.\n if (filePath != null) {\n engine.getTemplate(filePath.toAbsolutePath().toString())?.evaluate(writer, bundle)\n }\n return writer.toString()\n }\n\n override fun getFileExtensions(): Array = arrayOf("pebble")\n}\n')),Object(r.b)("p",null,"Lastly, create a file ",Object(r.b)("inlineCode",{parentName:"p"},"resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter"),", containing the full class path to the above class:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),"org.openapitools.examples.templating.PebbleTemplateAdapter\n")),Object(r.b)("p",null,"This allows the adapter to load via ServiceLoader, and to be referenced via the identifier ",Object(r.b)("inlineCode",{parentName:"p"},"pebble"),". This is optional; if you don't provide the above file and contents, you'll only be able to load the engine via full class name (explained in a bit)."),Object(r.b)("p",null,"Now, build the fatjar for this new adapter:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"./gradlew shadowJar\n")),Object(r.b)("p",null,"To test compilation of some templates, we'll need to first create one or more template files. Create a temp directory at ",Object(r.b)("inlineCode",{parentName:"p"},"/tmp/pebble-example/templates")," and add the following files."),Object(r.b)("p",null,Object(r.b)("em",{parentName:"p"},"api.pebble")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'package {{packageName}}\n\nimport (\n "net/http"\n{% for item in imports %}\n "{{item.import}}"\n{% endfor %}\n)\n\ntype Generated{{classname}}Servicer\n\n// etc\n')),Object(r.b)("p",null,Object(r.b)("em",{parentName:"p"},"model.pebble")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'package {{packageName}}\n\n{% for item in models %}\n{% if item.isEnum %}\n// TODO: enum\n{% else %}\n{% if item.description is not empty %}// {{item.description}}{% endif %}\ntype {{item.classname}} struct {\n{% for var in item.model.vars %}\n {% if var.description is not empty %}// {{var.description}}{% endif %}\n {{var.name}} {% if var.isNullable %}*{% endif %}{{var.dataType}} `json:"{{var.baseName}}{% if var.required == false %},omitempty{% endif %}"{% if var.withXml == true %} xml:"{{var.baseName}}{% if var.isXmlAttribute %},attr{% endif %}"{% endif %}`\n{% endfor %}\n}\n{% endif %}\n{{model.name}}\n{% endfor %}\n')),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Find object structures passed to templates later in this document's ",Object(r.b)("strong",{parentName:"p"},"Structures")," section.")),Object(r.b)("p",null,"Finally, we can compile some code by explicitly defining our classpath and jar entrypoint for CLI (be sure to modify ",Object(r.b)("inlineCode",{parentName:"p"},"/your/path")," below)"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"java $JAVA_OPTS -cp /your/path/build/libs/pebble-template-adapter-1.0-SNAPSHOT-all.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \\\n org.openapitools.codegen.OpenAPIGenerator \\\n generate \\\n -g go \\\n -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-minimal.json \\\n -e pebble \\\n -o /tmp/pebble-example/out \\\n -t /tmp/pebble-example/templates \\\n --global-property models,modelDocs,modelTests,apis,apiTests,apiDocs\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"NOTE")," Running your custom generator requires adding it to the classpath. This differs on ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html"}),"Windows")," slightly from ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"}),"unix"),"."),Object(r.b)("p",null,"In the above example, we've targeted our custom template engine adapter via ",Object(r.b)("inlineCode",{parentName:"p"},"-e pebble"),". If you don't include the SPI file under ",Object(r.b)("inlineCode",{parentName:"p"},"META-INF/services"),", you'll need to specify the exact classpath: ",Object(r.b)("inlineCode",{parentName:"p"},"org.openapitools.examples.templating.PebbleTemplateAdapter"),". Notice that the target class here matches the Kotlin class name. This is because of the ",Object(r.b)("inlineCode",{parentName:"p"},"@file:JvmName")," annotation."),Object(r.b)("p",null,"Congratulations on creating a custom templating engine adapter!"),Object(r.b)("h2",{id:"structures"},"Structures"),Object(r.b)("p",null,"Aside from transforming an API document, the implementing class gets to decide how to apply the data structure to templates. We can decide which data structure to apply to which template files. You have the following structures at your disposal."),Object(r.b)("p",null,"Examples for the following structures will be presented using the following spec document:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),' swagger: "2.0"\n info:\n version: "1.0.0"\n title: "Swagger Petstore"\n description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"\n termsOfService: "http://swagger.io/terms/"\n contact:\n name: "Swagger API Team"\n license:\n name: "MIT"\n host: "petstore.swagger.io"\n basePath: "/api"\n schemes:\n - "http"\n consumes:\n - "application/json"\n produces:\n - "application/json"\n paths:\n /pets:\n get:\n description: "Returns all pets from the system that the user has access to"\n produces:\n - "application/json"\n responses:\n "200":\n description: "A list of pets."\n schema:\n type: "array"\n items:\n $ref: "#/definitions/Pet"\n definitions:\n Pet:\n type: "object"\n required:\n - "id"\n - "name"\n properties:\n id:\n type: "integer"\n format: "int64"\n name:\n type: "string"\n tag:\n type: "string"\n\n')),Object(r.b)("h3",{id:"operations"},"Operations"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect operation structures passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")),Object(r.b)("p",{parentName:"blockquote"},"Example:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugOpenAPI=true\n"))),Object(r.b)("p",null,"There is a data structure which represents all the operations that are defined in the OpenAPI specification. A single API file is created for each ",Object(r.b)("inlineCode",{parentName:"p"},"OperationGroup"),", which is essentially a grouping of different operations. See the ",Object(r.b)("inlineCode",{parentName:"p"},"addOperationToGroup")," in ",Object(r.b)("inlineCode",{parentName:"p"},"DefaultCodegen.java")," for details on this operation."),Object(r.b)("p",null,"You can have many files created for each ",Object(r.b)("inlineCode",{parentName:"p"},"OperationGroup")," by processing multiple templates and assigning a different file naming pattern to them. So for a single file per operation:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-java"}),'// process the `api.mustache` template and output a single file with suffix `.java`:\napiTemplateFiles.put("api.mustache", ".java");\n')),Object(r.b)("p",null,"For C-like languages which also require header files, you may create two files per operation."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-objectivec"}),'// create a header and implementation for each operation group:\napiTemplateFiles.put("api-header.mustache", ".h");\napiTemplateFiles.put("api-body.mustache", ".m");\n')),Object(r.b)("p",null,"Here, an Operation with tag ",Object(r.b)("inlineCode",{parentName:"p"},"Pet")," will generate two files: ",Object(r.b)("inlineCode",{parentName:"p"},"SWGPetApi.h")," and ",Object(r.b)("inlineCode",{parentName:"p"},"SWGPetApi.m"),". The ",Object(r.b)("inlineCode",{parentName:"p"},"SWG")," prefix and ",Object(r.b)("inlineCode",{parentName:"p"},"Api")," suffix are options specific to the Objective-C generator."),Object(r.b)("h3",{id:"models"},"Models"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect models passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugModels=true")),Object(r.b)("p",{parentName:"blockquote"},"Execute:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugModels=true\n"))),Object(r.b)("p",null,"Each model identified inside the generator will be passed into the ",Object(r.b)("inlineCode",{parentName:"p"},"Models")," data structure and will generate a new model file (or files) for each model."),Object(r.b)("p",null,"A ",Object(r.b)("inlineCode",{parentName:"p"},"Pet")," model with three properties will provide a ",Object(r.b)("em",{parentName:"p"},"lot")," of information about the type and properties. The output from ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugModels=true")," is presented in truncated format here."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'[ {\n "importPath" : "openapi.Pet",\n "model" : {\n "name" : "Pet",\n "classname" : "Pet",\n "classVarName" : "Pet",\n "modelJson" : "{\\n \\"required\\" : [ \\"id\\", \\"name\\" ],\\n \\"type\\" : \\"object\\",\\n \\"properties\\" : {\\n \\"id\\" : {\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n },\\n \\"name\\" : {\\n \\"type\\" : \\"string\\"\\n },\\n \\"tag\\" : {\\n \\"type\\" : \\"string\\"\\n }\\n }\\n}",\n "dataType" : "map[string]interface{}",\n "classFilename" : "model_pet",\n "isAlias" : false,\n "isString" : false,\n "isInteger" : false,\n "vars" : [ {\n "baseName" : "id",\n "getter" : "getId",\n "setter" : "setId",\n "dataType" : "int64",\n "datatypeWithEnum" : "int64",\n "dataFormat" : "int64",\n "name" : "Id",\n "defaultValueWithParam" : " = data.id;",\n "baseType" : "int64",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : false,\n "isNumeric" : true,\n "isInteger" : false,\n "isLong" : true,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Id",\n "nameInSnakeCase" : "ID",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "int64",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "name",\n "getter" : "getName",\n "setter" : "setName",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Name",\n "defaultValueWithParam" : " = data.name;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Name",\n "nameInSnakeCase" : "NAME",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "tag",\n "getter" : "getTag",\n "setter" : "setTag",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Tag",\n "defaultValueWithParam" : " = data.tag;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : false,\n "hasMoreNonReadOnly" : false,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Tag",\n "nameInSnakeCase" : "TAG",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n } ],\n "requiredVars" : [ /* id, name */ ],\n "optionalVars" : [ /* tag */ ],\n "readOnlyVars" : [ ],\n "readWriteVars" : [ /* lists metadata for all three properties */ ],\n "allVars" : [ /* lists all properties */],\n "parentVars" : [ ],\n "mandatory" : [ "id", "name" ],\n "allMandatory" : [ "id", "name" ],\n "imports" : [ ],\n "hasVars" : true,\n "emptyVars" : false,\n "hasMoreModels" : false,\n "hasEnums" : false,\n "isEnum" : false,\n "hasRequired" : true,\n "hasOptional" : true,\n "isArray" : false,\n "hasChildren" : false,\n "isMap" : false,\n "hasOnlyReadOnly" : false,\n "vendorExtensions" : { }\n }\n} ]\n')),Object(r.b)("p",null,"Templates are passed redundant properties, depending on the semantics of the array. For example:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"vars")," lists all defined model properties"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"requiredVars")," lists all model properties marked with ",Object(r.b)("inlineCode",{parentName:"li"},"required")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"optionalVars")," lists all model properties ",Object(r.b)("em",{parentName:"li"},"not")," marked with ",Object(r.b)("inlineCode",{parentName:"li"},"required")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"readWriteVars")," lists all model properties ",Object(r.b)("em",{parentName:"li"},"not")," marked with ",Object(r.b)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"readOnlyVars")," lists all model properties marked with ",Object(r.b)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"allVars")," lists all model properties. This may include the same set as ",Object(r.b)("inlineCode",{parentName:"li"},"vars"),", but may also include generator-defined properties")),Object(r.b)("p",null,'We expose the same properties in multiple sets because this allows us to conditionally iterate over properties based on some condition ("is it required" or "is it readonly"). This is driven by the use of the logic-less Mustache templates. It is possible that models passed to the templating engine may be cleaned up as we support more template engines, but such an effort will go through a deprecation phase and would be communicated at runtime through log messages.'),Object(r.b)("h3",{id:"supportingfiles"},"supportingFiles"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect supportingFiles passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugSupportingFiles=true")),Object(r.b)("p",{parentName:"blockquote"},"Execute:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugSupportingFiles=true\n"))),Object(r.b)("p",null,'This is a "catch-all" which gives you the entire structure--operations, model, etc--so you can create "single-file" code from them.'),Object(r.b)("p",null,"Supporting files can either be processed through the templating engine or copied as-is. When creating your own templates, you're limited to the files and extensions expected by the generator implementation. For more control over the supporting files produced by a generator, see our ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/customization"}),"customization")," documentation."),Object(r.b)("h2",{id:"variables"},"Variables"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"This is a very limited list of variable name explanations. Feel free to ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/pull/new/master"}),"open a pull request")," to add to this documentation!")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"complexType"),": stores the name of the model (e.g. Pet)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"isContainer"),": true if the parameter or property is an array or a map."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"isPrimitiveType"),": true if the parameter or property type is a primitive type (e.g. string, integer, etc) as defined in the spec.")),Object(r.b)("h2",{id:"mustache-lambdas"},"Mustache Lambdas"),Object(r.b)("p",null,"Many generators (",Object(r.b)("em",{parentName:"p"},"those extending DefaultCodegen"),") come with a small set of lambda functions available under the key ",Object(r.b)("inlineCode",{parentName:"p"},"lambda"),":"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"lowercase")," - Converts all of the characters in this fragment to lower case using the rules of the ",Object(r.b)("inlineCode",{parentName:"li"},"ROOT")," locale."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"uppercase")," - Converts all of the characters in this fragment to upper case using the rules of the ",Object(r.b)("inlineCode",{parentName:"li"},"ROOT")," locale."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"titlecase")," - Converts text in a fragment to title case. For example ",Object(r.b)("inlineCode",{parentName:"li"},"once upon a time")," to ",Object(r.b)("inlineCode",{parentName:"li"},"Once Upon A Time"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"camelcase")," - Converts text in a fragment to camelCase. For example ",Object(r.b)("inlineCode",{parentName:"li"},"Input-text")," to ",Object(r.b)("inlineCode",{parentName:"li"},"inputText"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented")," - Prepends 4 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_8")," - Prepends 8 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_12")," - Prepends 12 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_16")," -Prepends 16 spaces indention from second line of a fragment on. First line will be indented by Mustache.")),Object(r.b)("p",null,"Lambda is invoked by ",Object(r.b)("inlineCode",{parentName:"p"},"lambda.[lambda name]")," expression. For example: ",Object(r.b)("inlineCode",{parentName:"p"},"{{#lambda.lowercase}}FRAGMENT TO LOWERCASE{{/lambda.lowercase}}")," to lower case text between ",Object(r.b)("inlineCode",{parentName:"p"},"lambda.lowercase"),"."),Object(r.b)("h2",{id:"extensions"},"Extensions"),Object(r.b)("p",null,'OpenAPI supports a concept called "Extensions". These are called "Specification Extensions" ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions"}),"in 3.x"),' and "Vendor Extensions" ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions"}),"in 2.0"),'.\nYou\'ll see them referred to as "Vendor Extensions" in most places in this project.'),Object(r.b)("p",null,"Vendor extensions allow you to provide vendor-specific configurations to your specification document."),Object(r.b)("p",null,"For example, suppose you use your specification document for code generation with a (hypothetical) C# OpenAPI generator supporting a desired operationId prefix where the extension is ",Object(r.b)("inlineCode",{parentName:"p"},"x-csharp-operationid"),", you can define this property alongside the object you'd like to extend (which would be a Path Object in this case). You could then apply additional extensions alongside this property, whether they're for another language or other tooling."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Well-defined vendor extensions don't cause conflicts with other tooling.")),Object(r.b)("p",null,'The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.'),Object(r.b)("h3",{id:"all-generators-core"},"All generators (core)"),Object(r.b)("h4",{id:"enum"},"Enum"),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-varnames")," can be used to have an other enum name for the corresponding value.\nThis is used to define names of the enum items."),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-descriptions")," can be used to provide an individual description for each value.\nThis is used for comments in the code (like javadoc if the target language is java)."),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-descriptions")," and ",Object(r.b)("inlineCode",{parentName:"p"},"x-enum-varnames")," are each expected to be list of items containing the same number of items as ",Object(r.b)("inlineCode",{parentName:"p"},"enum"),".\nThe order of the items in the list matters: their position is used to group them together."),Object(r.b)("p",null,"Example:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"WeatherType:\n type: integer\n format: int32\n enum:\n - 42\n - 18\n - 56\n x-enum-descriptions:\n - 'Blue sky'\n - 'Slightly overcast'\n - 'Take an umbrella with you'\n x-enum-varnames:\n - Sunny\n - Cloudy\n - Rainy\n")),Object(r.b)("p",null,"In the example for the integer value ",Object(r.b)("inlineCode",{parentName:"p"},"42"),", the description will be ",Object(r.b)("inlineCode",{parentName:"p"},"Blue sky")," and the name of the enum item will be ",Object(r.b)("inlineCode",{parentName:"p"},"Sunny")," (some generators changes it to ",Object(r.b)("inlineCode",{parentName:"p"},"SUNNY")," to respect some coding convention)."),Object(r.b)("h3",{id:"objc"},"ObjC"),Object(r.b)("h4",{id:"x-objc-operationid"},"x-objc-operationId"),Object(r.b)("p",null,"To customize the method name, you can provide a different name in x-objc-operationId, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"summary: Add a new pet to the store\ndescription: ''\noperationId: addPet\nx-objc-operationId: CreateNewPet\n")),Object(r.b)("h3",{id:"java-feign"},"Java (Feign)"),Object(r.b)("h4",{id:"x-accepts"},"x-accepts"),Object(r.b)("p",null,"A single ",Object(r.b)("inlineCode",{parentName:"p"},"Accepts")," value as the Feign API client needs a single value for ",Object(r.b)("inlineCode",{parentName:"p"},"Accepts")," header, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"consumes:\n - application/json\n - application/xml\nx-accepts: application/json\n")),Object(r.b)("h3",{id:"x-content-type"},"x-content-type"),Object(r.b)("p",null,'A single "Content-Type" value as the Feign API client needs a single value for ',Object(r.b)("inlineCode",{parentName:"p"},"Content-Type")," header, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"produces:\n - application/xml\n - application/json\nx-content-type: application/json\n")),Object(r.b)("h3",{id:"rust-server"},"Rust-server"),Object(r.b)("h4",{id:"x-response-id"},"x-response-id"),Object(r.b)("p",null,"Each response may specify a unique ",Object(r.b)("inlineCode",{parentName:"p"},"x-response-id"),". ",Object(r.b)("inlineCode",{parentName:"p"},"rust-server")," will use this to name the corresponding enum variant in the code. e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /ping:\n get:\n responses:\n 200:\n description: OK\n x-response-id: Pong\n")),Object(r.b)("h3",{id:"mysql-schema"},"MySQL Schema"),Object(r.b)("h4",{id:"x-mysqlschema"},"x-mysqlSchema"),Object(r.b)("p",null,"MySQL schema generator creates vendor extensions based on openapi ",Object(r.b)("inlineCode",{parentName:"p"},"dataType")," and ",Object(r.b)("inlineCode",{parentName:"p"},"dataFormat"),". When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in ",Object(r.b)("inlineCode",{parentName:"p"},"definitions")," can contain table related and column related extensions like in example below:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"definitions:\n Order:\n description: This should be most common InnoDB table\n type: object\n properties:\n id:\n description: >-\n This column should be unsigned BIGINT with AUTO_INCREMENT\n type: integer\n format: int64\n x-mysqlSchema:\n columnDefinition:\n colName: id\n colDataType: DECIMAL\n colDataTypeArguments:\n - argumentValue: 16\n isString: false\n - argumentValue: 4\n isString: false\n colUnsigned: true\n colNotNull: true\n colDefault:\n defaultValue: AUTO_INCREMENT\n isString: false\n isNumeric: false\n isKeyword: true\n colComment: >-\n Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT\n x-mysqlSchema:\n tableDefinition:\n tblName: orders\n tblStorageEngine: InnoDB\n tblComment: >-\n Table comment. This should be most common InnoDB table\n")),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"There are properties that are not implemented by now(",Object(r.b)("inlineCode",{parentName:"p"},"tblStorageEngine"),"), but you can see how generator can be enhanced in future.")),Object(r.b)("h2",{id:"mustache-tips"},"Mustache Tips"),Object(r.b)("p",null,"Here are a few tips we've found useful for new template authors.\nFor more details on Mustache see ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://mustache.github.io/mustache.5.html"}),"mustache.5"),". See also ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/samskivert/jmustache"}),"samskivert/jmustache")," for implementation-specific details."),Object(r.b)("h3",{id:"firstlast"},"First/Last"),Object(r.b)("p",null,"To access the first or last element in a list using Mustache:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}\n{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}\n")),Object(r.b)("h3",{id:"this"},"This"),Object(r.b)("p",null,"Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept)."),Object(r.b)("p",null,"You can inspect this entire context by outputting ",Object(r.b)("inlineCode",{parentName:"p"},"{{this}}"),". For example:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#operations}}{{this}}{{/operations}}\n")),Object(r.b)("h3",{id:"index"},"Index"),Object(r.b)("p",null,"If you'd like a 1-based index in your array traversal, you can use ",Object(r.b)("inlineCode",{parentName:"p"},"{{-index}}"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#enums}}{{-index}} {{enum}}{{/enums}}\n")))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return u}));var a=n(0),i=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=i.a.createContext({}),c=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=c(e.components);return i.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),b=c(n),d=a,u=b["".concat(o,".").concat(d)]||b[d]||m[d]||r;return n?i.a.createElement(u,l({ref:t},p,{components:n})):i.a.createElement(u,l({ref:t},p))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p"),". In cases where you're unsure, you will need to find the ",Object(r.b)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," assignment in your desired generator. This is almost always assigned in the constructor of the generator class. The C# .Net Core generator assigns this as:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'embeddedTemplateDir = templateDir = "csharp-netcore";\n')),Object(r.b)("p",null,"These templates are in our source repository at ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp-netcore"}),"modules/openapi-generator/src/main/resources/csharp-netcore"),". Be sure to select the tag or branch for the version of OpenAPI Generator you're using before grabbing the templates."),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"NOTE")," If you have specific logic you'd like to modify such as modifying the generated README, you ",Object(r.b)("em",{parentName:"p"},"only")," need to pull and modify this individual template. OpenAPI Generator will lookup templates in this order:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"User customized library path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"custom_template/libraries/feign/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"User customized generator top-level path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"custom_template/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Embedded library path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/Java/libraries/feign/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Embedded top-level path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/Java/model.mustache"),")"),Object(r.b)("li",{parentName:"ul"},"Common embedded path (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"resources/_common/model.mustache"),")")),Object(r.b)("h3",{id:"custom-logic"},"Custom Logic"),Object(r.b)("p",null,"For this example, let's modify a Java client to use AOP via ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/jcabi/jcabi-aspects"}),"jcabi/jcabi-aspects"),". We'll log API method execution at the ",Object(r.b)("inlineCode",{parentName:"p"},"INFO")," level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating."),Object(r.b)("p",null,"The Java generator supports a ",Object(r.b)("inlineCode",{parentName:"p"},"library"),' option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the ',Object(r.b)("inlineCode",{parentName:"p"},"library")," option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name."),Object(r.b)("p",null,"To get started, we will need to copy our target generator's directory in full."),Object(r.b)("p",null,"The directory will be located under ",Object(r.b)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/{generator}"),". In general, the generator directory matches the generator name (what you would pass to the ",Object(r.b)("inlineCode",{parentName:"p"},"generator")," option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the ",Object(r.b)("inlineCode",{parentName:"p"},"embeddedTemplateDir")," option in your target generator's implementation."),Object(r.b)("p",null,"If you've already cloned openapi-generator, find and copy the ",Object(r.b)("inlineCode",{parentName:"p"},"modules/openapi-generator/src/main/resources/Java")," directory. If you have the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/sindresorhus/refined-github"}),"Refined GitHub"),' Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master:'),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"mkdir -p ~/.openapi-generator/templates/ && cd $_\ncurl -L https://api.github.com/repos/OpenAPITools/openapi-generator/tarball | tar xz\nmv `ls`/modules/openapi-generator/src/main/resources/Java ./Java\n\\rm -rf OpenAPITools-openapi-generator-*\ncd Java\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Optional"),": Before modifying your templates, you may want to ",Object(r.b)("inlineCode",{parentName:"p"},"git init && git add . && git commit -am 'initial'")," so you can easily revert to the base templates."),Object(r.b)("p",null,"At this point, you have ",Object(r.b)("em",{parentName:"p"},"every")," Java library's template locally. Let's delete all libraries except the ",Object(r.b)("inlineCode",{parentName:"p"},"resteasy")," library we'll be extending:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"ls -d libraries/* | grep -v resteasy | xargs rm -rf\n")),Object(r.b)("p",null,"Execute ",Object(r.b)("inlineCode",{parentName:"p"},"tree")," in this Java directory and inspect the mustache files and directory structure. You'll notice there are quite a few templates in the directory root, but extending this root to support resteasy only requires modifying a handful of files:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"tree libraries/resteasy/\nlibraries/resteasy/\n\u251c\u2500\u2500 ApiClient.mustache\n\u251c\u2500\u2500 JSON.mustache\n\u251c\u2500\u2500 api.mustache\n\u251c\u2500\u2500 build.gradle.mustache\n\u251c\u2500\u2500 build.sbt.mustache\n\u2514\u2500\u2500 pom.mustache\n\n0 directories, 6 files\n")),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"NOTE: Some generators may be sensitive to ",Object(r.b)("em",{parentName:"p"},"which")," files exist. If you're concerned with redundant files like ",Object(r.b)("inlineCode",{parentName:"p"},"pom.mustache")," and ",Object(r.b)("inlineCode",{parentName:"p"},"build.sbt.mustache"),", you can try deleting them. If the generator you're customizing fails at runtime, just ",Object(r.b)("inlineCode",{parentName:"p"},"touch")," these files to create an empty file.")),Object(r.b)("p",null,"First, let's add our new dependency to ",Object(r.b)("inlineCode",{parentName:"p"},"libraries/resteasy/build.gradle.mustache"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),'diff --git a/libraries/resteasy/build.gradle.mustache b/libraries/resteasy/build.gradle.mustache\nindex 3b40702..a6d12e0 100644\n--- a/libraries/resteasy/build.gradle.mustache\n+++ b/libraries/resteasy/build.gradle.mustache\n@@ -134,6 +134,7 @@ ext {\n }\n\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "org.jboss.resteasy:resteasy-client:$resteasy_version"\n compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"\n\n')),Object(r.b)("p",null,"Then, we'll add the necessary import to ",Object(r.b)("inlineCode",{parentName:"p"},"api.mustache"),". This file is the template which becomes the API invoking class (e.g. ",Object(r.b)("inlineCode",{parentName:"p"},"PetApi")," or ",Object(r.b)("inlineCode",{parentName:"p"},"StoreApi"),")."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex a4d0f9f..49b17c7 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -1,5 +1,6 @@\n package {{package}};\n\n+import com.jcabi.aspects.Loggable;\n import {{invokerPackage}}.ApiException;\n import {{invokerPackage}}.ApiClient;\n import {{invokerPackage}}.Configuration;\n\n")),Object(r.b)("p",null,"Next, we'll find the code which generates API methods. You'll see ",Object(r.b)("inlineCode",{parentName:"p"},"{{#operations}}{{#operation}}"),' which is a mustache "loop" which executes the template logic if the model applied to the template has an ',Object(r.b)("inlineCode",{parentName:"p"},"operations")," array, and a non-null ",Object(r.b)("inlineCode",{parentName:"p"},"operation")," instance in that array. You can pass ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")," when generating via CLI to inspect the full object model."),Object(r.b)("p",null,"Further down in ",Object(r.b)("inlineCode",{parentName:"p"},"api.mustache"),", find implementation of the method call, and add the ",Object(r.b)("inlineCode",{parentName:"p"},"@Loggable")," annotation. This template is easy because it has a single method implementation."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/libraries/resteasy/api.mustache b/libraries/resteasy/api.mustache\nindex 49b17c7..16ee191 100644\n--- a/libraries/resteasy/api.mustache\n+++ b/libraries/resteasy/api.mustache\n@@ -57,6 +57,7 @@ public class {{classname}} {\n {{#isDeprecated}}\n @Deprecated\n {{/isDeprecated}}\n+ @Loggable(Loggable.INFO)\n public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {\n Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};\n {{#allParams}}{{#required}}\n\n")),Object(r.b)("p",null,"Finally, because our new dependency relies on AspectJ and code weaving, let's modify the ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle.mustache")," again to set this up."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),'diff --git a/build.gradle.mustache b/build.gradle.mustache\nindex 04a9d55..7a93c50 100644\n--- a/build.gradle.mustache\n+++ b/build.gradle.mustache\n@@ -1,5 +1,6 @@\n apply plugin: \'idea\'\n apply plugin: \'eclipse\'\n+apply plugin: \'aspectj\'\n\n group = \'{{groupId}}\'\n version = \'{{artifactVersion}}\'\n@@ -12,6 +13,7 @@ buildscript {\n dependencies {\n classpath \'com.android.tools.build:gradle:2.3.+\'\n classpath \'com.github.dcendents:android-maven-gradle-plugin:1.5\'\n+ classpath "net.uberfoo.gradle:gradle-aspectj:2.2"\n }\n }\n\n@@ -140,9 +142,18 @@ ext {\n jersey_version = "1.19.4"\n jodatime_version = "2.9.9"\n junit_version = "4.13"\n+ aspectjVersion = \'1.9.0\'\n }\n\n+sourceCompatibility = \'1.8\'\n+targetCompatibility = \'1.8\'\n+\n dependencies {\n+ compile "com.jcabi:jcabi-aspects:0.22.6"\n+ aspectpath "com.jcabi:jcabi-aspects:0.22.6"\n+ // usually, client code leaves logging implementation to the consumer code\n+ compile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.2"\n+ compile "org.apache.logging.log4j:log4j-core:2.8.2"\n compile "io.swagger:swagger-annotations:$swagger_annotations_version"\n compile "com.sun.jersey:jersey-client:$jersey_version"\n compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"\n\n')),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"NOTE: This example includes log4j-slf4j-impl to demonstrate that our new code is working. Generally you'll want to leave logging implementations up to your consumers.")),Object(r.b)("p",null,"And because the java client generates with an outdated Gradle 2.6, let's update the gradle version in the default template (",Object(r.b)("inlineCode",{parentName:"p"},"Java/gradle-wrapper.properties.mustache"),"):"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),"diff --git a/gradle-wrapper.properties.mustache b/gradle-wrapper.properties.mustache\nindex b7a3647..3d9d088 100644\n--- a/gradle-wrapper.properties.mustache\n+++ b/gradle-wrapper.properties.mustache\n@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\n distributionPath=wrapper/dists\n zipStoreBase=GRADLE_USER_HOME\n zipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-2.6-bin.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-4.8-bin.zip\n\n")),Object(r.b)("p",null,"Now we're ready to generate the client with our simple changes. When we pass the template directory option to our toolset, we ",Object(r.b)("em",{parentName:"p"},"must")," pass the generator's root directory and ",Object(r.b)("em",{parentName:"p"},"not")," the library-only directory."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g java --library resteasy \\\n -t ~/.openapi-generator/templates/Java \\\n -o ~/.openapi-generator/example \\\n -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml\n")),Object(r.b)("p",null,"Make sure your custom template compiles:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"cd ~/.openapi-generator/example\ngradle assemble\n# or, regenerate the wrapper\ngradle wrapper --gradle-version 4.8 --distribution-type all\n./gradlew assemble\n")),Object(r.b)("p",null,"You should see a log message showing our added dependency being downloaded:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-text"}),"\u2026\nDownload https://jcenter.bintray.com/com/jcabi/jcabi-aspects/0.22.6/jcabi-aspects-0.22.6.pom\n\u2026\n")),Object(r.b)("p",null,"And for the sake of verifying our AOP modifications work, let's create a ",Object(r.b)("inlineCode",{parentName:"p"},"src/main/resources/log4j2.properties")," file in our new client code:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-properties"}),"status = error\ndest = err\nname = PropertiesConfig\n\nproperty.filename = target/rolling/rollingtest.log\n\nfilter.threshold.type = ThresholdFilter\nfilter.threshold.level = debug\n\nappender.console.type = Console\nappender.console.name = STDOUT\nappender.console.layout.type = PatternLayout\nappender.console.layout.pattern = %m%n\nappender.console.filter.threshold.type = ThresholdFilter\nappender.console.filter.threshold.level = error\n\nappender.rolling.type = RollingFile\nappender.rolling.name = RollingFile\nappender.rolling.fileName = ${filename}\nappender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz\nappender.rolling.layout.type = PatternLayout\nappender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n\nappender.rolling.policies.type = Policies\nappender.rolling.policies.time.type = TimeBasedTriggeringPolicy\nappender.rolling.policies.time.interval = 2\nappender.rolling.policies.time.modulate = true\nappender.rolling.policies.size.type = SizeBasedTriggeringPolicy\nappender.rolling.policies.size.size=100MB\nappender.rolling.strategy.type = DefaultRolloverStrategy\nappender.rolling.strategy.max = 5\n\nlogger.rolling.name = org.openapitools.client.api.PetApi\nlogger.rolling.level = debug\nlogger.rolling.additivity = false\nlogger.rolling.appenderRef.rolling.ref = RollingFile\n\nrootLogger.level = info\nrootLogger.appenderRef.stdout.ref = STDOUT\n")),Object(r.b)("p",null,"Execute ",Object(r.b)("inlineCode",{parentName:"p"},"./gradlew build")," and then ",Object(r.b)("inlineCode",{parentName:"p"},"cat target/rolling/rollingtest.log"),". You should see messages logged for every call in PetApi with a stubbed unit test."),Object(r.b)("p",null,"Congratulations! You've now modified one of the built-in templates to meet your client code's needs."),Object(r.b)("p",null,"Adding/modifying template logic simply requires a little bit of ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://mustache.github.io/"}),"mustache"),", for which you can use existing templates as a guide."),Object(r.b)("h3",{id:"custom-engines"},"Custom Engines"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Custom template engine support is ",Object(r.b)("em",{parentName:"p"},"experimental"))),Object(r.b)("p",null,"If Mustache or the experimental Handlebars engines don't suit your needs, you can define an adapter to your templating engine of choice. To do this, you'll need to define a new project which consumes the ",Object(r.b)("inlineCode",{parentName:"p"},"openapi-generator-core")," artifact, and at a minimum implement ",Object(r.b)("inlineCode",{parentName:"p"},"TemplatingEngineAdapter"),"."),Object(r.b)("p",null,"This example:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"creates an adapter providing the fundamental logic to compile ",Object(r.b)("a",Object(a.a)({parentName:"li"},{href:"https://pebbletemplates.io"}),"Pebble Templates")),Object(r.b)("li",{parentName:"ul"},"will be implemented in Kotlin to demonstrate ServiceLoader configuration specific to Kotlin (Java will be similar)"),Object(r.b)("li",{parentName:"ul"},"requires Gradle 5.0+"),Object(r.b)("li",{parentName:"ul"},"provides project setup instructions for IntelliJ")),Object(r.b)("p",null,"To begin, create a ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.jetbrains.com/help/idea/getting-started-with-gradle.html"}),"new Gradle project")," with Kotlin support. To do this, go to ",Object(r.b)("inlineCode",{parentName:"p"},"File")," \u279e ",Object(r.b)("inlineCode",{parentName:"p"},"New")," \u279e ",Object(r.b)("inlineCode",{parentName:"p"},"Project"),', choose "Gradle" and "Kotlin". Specify groupId ',Object(r.b)("inlineCode",{parentName:"p"},"org.openapitools.examples")," and artifactId ",Object(r.b)("inlineCode",{parentName:"p"},"pebble-template-adapter"),"."),Object(r.b)("p",null,"Ensure the new project uses Gradle 5.0. Navigate to the newly created directory and execute:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"gradle wrapper --gradle-version 5.0\n")),Object(r.b)("p",null,"In ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle"),", we'll add a dependency for OpenAPI Tools core which defines the interface and an abstract helper type for implementing the adapter. We'll also pull in the Pebble artifact. We'll be evaluating this new artifact locally, so we'll also add the Maven plugin for installing to the local maven repository. We'll also create a fatjar using the ",Object(r.b)("inlineCode",{parentName:"p"},"shadow")," plugin to simplify our classpath."),Object(r.b)("p",null,"Modifications to the new project's ",Object(r.b)("inlineCode",{parentName:"p"},"build.gradle")," should be made in the ",Object(r.b)("inlineCode",{parentName:"p"},"plugins")," and ",Object(r.b)("inlineCode",{parentName:"p"},"dependencies")," nodes:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-diff"}),' plugins {\n id \'org.jetbrains.kotlin.jvm\' version \'1.3.11\'\n id "com.github.johnrengelman.shadow" version "5.0.0"\n }\n\n dependencies {\n compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"\n compile "org.openapitools:openapi-generator-core:4.0.0-SNAPSHOT"\n compile "io.pebbletemplates:pebble:3.0.8"\n }\n')),Object(r.b)("p",null,"The above configuration for the ",Object(r.b)("inlineCode",{parentName:"p"},"shadow")," plugin is strictly optional. It is not needed, for instance, if you plan to publish your adapter and consume it via the Maven or Gradle plugins."),Object(r.b)("p",null,"Next, create a new class file called ",Object(r.b)("inlineCode",{parentName:"p"},"PebbleTemplateEngineAdapter")," under ",Object(r.b)("inlineCode",{parentName:"p"},"src/kotlin"),". We'll define the template adapter's name as ",Object(r.b)("inlineCode",{parentName:"p"},"pebble")," and we'll also list this as the only supported file extension. We'll implement the adapter by extending ",Object(r.b)("inlineCode",{parentName:"p"},"AbstractTemplatingEngineAdapter"),", which includes reusable logic, such as retrieving a list of all possible template names for our provided template extensions(s)."),Object(r.b)("p",null,"The class in its simplest form looks like this (with inline comments):"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-kotlin"}),'// Allows specifying engine by class name\n// e.g. -e org.openapitools.examples.templating.PebbleTemplateAdapter\n@file:JvmName("PebbleTemplateAdapter")\npackage org.openapitools.examples.templating\n\n// imports\n\nclass PebbleTemplateAdapter : AbstractTemplatingEngineAdapter() {\n // initialize the template compilation engine\n private val engine: PebbleEngine = PebbleEngine.Builder()\n .cacheActive(false)\n .loader(DelegatingLoader(listOf(FileLoader(), ClasspathLoader())))\n .build()\n\n // allows targeting engine by id/name: -e pebble\n override fun getIdentifier(): String = "pebble"\n\n override fun compileTemplate(\n generator: TemplatingGenerator?,\n bundle: MutableMap?,\n templateFile: String?\n ): String {\n // This will convert, for example, model.mustache to model.pebble\n val modifiedTemplate = this.getModifiedFileLocation(templateFile).first()\n\n // Uses generator built-in template resolution strategy to find the full template file\n val filePath = generator?.getFullTemplatePath(modifiedTemplate)\n\n val writer = StringWriter()\n // Conditionally writes out the template if found.\n if (filePath != null) {\n engine.getTemplate(filePath.toAbsolutePath().toString())?.evaluate(writer, bundle)\n }\n return writer.toString()\n }\n\n override fun getFileExtensions(): Array = arrayOf("pebble")\n}\n')),Object(r.b)("p",null,"Lastly, create a file ",Object(r.b)("inlineCode",{parentName:"p"},"resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter"),", containing the full class path to the above class:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),"org.openapitools.examples.templating.PebbleTemplateAdapter\n")),Object(r.b)("p",null,"This allows the adapter to load via ServiceLoader, and to be referenced via the identifier ",Object(r.b)("inlineCode",{parentName:"p"},"pebble"),". This is optional; if you don't provide the above file and contents, you'll only be able to load the engine via full class name (explained in a bit)."),Object(r.b)("p",null,"Now, build the fatjar for this new adapter:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"./gradlew shadowJar\n")),Object(r.b)("p",null,"To test compilation of some templates, we'll need to first create one or more template files. Create a temp directory at ",Object(r.b)("inlineCode",{parentName:"p"},"/tmp/pebble-example/templates")," and add the following files."),Object(r.b)("p",null,Object(r.b)("em",{parentName:"p"},"api.pebble")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'package {{packageName}}\n\nimport (\n "net/http"\n{% for item in imports %}\n "{{item.import}}"\n{% endfor %}\n)\n\ntype Generated{{classname}}Servicer\n\n// etc\n')),Object(r.b)("p",null,Object(r.b)("em",{parentName:"p"},"model.pebble")),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),'package {{packageName}}\n\n{% for item in models %}\n{% if item.isEnum %}\n// TODO: enum\n{% else %}\n{% if item.description is not empty %}// {{item.description}}{% endif %}\ntype {{item.classname}} struct {\n{% for var in item.model.vars %}\n {% if var.description is not empty %}// {{var.description}}{% endif %}\n {{var.name}} {% if var.isNullable %}*{% endif %}{{var.dataType}} `json:"{{var.baseName}}{% if var.required == false %},omitempty{% endif %}"{% if var.withXml == true %} xml:"{{var.baseName}}{% if var.isXmlAttribute %},attr{% endif %}"{% endif %}`\n{% endfor %}\n}\n{% endif %}\n{{model.name}}\n{% endfor %}\n')),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Find object structures passed to templates later in this document's ",Object(r.b)("strong",{parentName:"p"},"Structures")," section.")),Object(r.b)("p",null,"Finally, we can compile some code by explicitly defining our classpath and jar entrypoint for CLI (be sure to modify ",Object(r.b)("inlineCode",{parentName:"p"},"/your/path")," below)"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"java $JAVA_OPTS -cp /your/path/build/libs/pebble-template-adapter-1.0-SNAPSHOT-all.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \\\n org.openapitools.codegen.OpenAPIGenerator \\\n generate \\\n -g go \\\n -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-minimal.json \\\n -e pebble \\\n -o /tmp/pebble-example/out \\\n -t /tmp/pebble-example/templates \\\n --global-property models,modelDocs,modelTests,apis,apiTests,apiDocs\n")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"NOTE")," Running your custom generator requires adding it to the classpath. This differs on ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html"}),"Windows")," slightly from ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html"}),"unix"),"."),Object(r.b)("p",null,"In the above example, we've targeted our custom template engine adapter via ",Object(r.b)("inlineCode",{parentName:"p"},"-e pebble"),". If you don't include the SPI file under ",Object(r.b)("inlineCode",{parentName:"p"},"META-INF/services"),", you'll need to specify the exact classpath: ",Object(r.b)("inlineCode",{parentName:"p"},"org.openapitools.examples.templating.PebbleTemplateAdapter"),". Notice that the target class here matches the Kotlin class name. This is because of the ",Object(r.b)("inlineCode",{parentName:"p"},"@file:JvmName")," annotation."),Object(r.b)("p",null,"Congratulations on creating a custom templating engine adapter!"),Object(r.b)("h2",{id:"structures"},"Structures"),Object(r.b)("p",null,"Aside from transforming an API document, the implementing class gets to decide how to apply the data structure to templates. We can decide which data structure to apply to which template files. You have the following structures at your disposal."),Object(r.b)("p",null,"Examples for the following structures will be presented using the following spec document:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),' swagger: "2.0"\n info:\n version: "1.0.0"\n title: "Swagger Petstore"\n description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"\n termsOfService: "http://swagger.io/terms/"\n contact:\n name: "Swagger API Team"\n license:\n name: "MIT"\n host: "petstore.swagger.io"\n basePath: "/api"\n schemes:\n - "http"\n consumes:\n - "application/json"\n produces:\n - "application/json"\n paths:\n /pets:\n get:\n description: "Returns all pets from the system that the user has access to"\n produces:\n - "application/json"\n responses:\n "200":\n description: "A list of pets."\n schema:\n type: "array"\n items:\n $ref: "#/definitions/Pet"\n definitions:\n Pet:\n type: "object"\n required:\n - "id"\n - "name"\n properties:\n id:\n type: "integer"\n format: "int64"\n name:\n type: "string"\n tag:\n type: "string"\n\n')),Object(r.b)("h3",{id:"operations"},"Operations"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect operation structures passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugOpenAPI=true")),Object(r.b)("p",{parentName:"blockquote"},"Example:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugOpenAPI=true\n"))),Object(r.b)("p",null,"There is a data structure which represents all the operations that are defined in the OpenAPI specification. A single API file is created for each ",Object(r.b)("inlineCode",{parentName:"p"},"OperationGroup"),", which is essentially a grouping of different operations. See the ",Object(r.b)("inlineCode",{parentName:"p"},"addOperationToGroup")," in ",Object(r.b)("inlineCode",{parentName:"p"},"DefaultCodegen.java")," for details on this operation."),Object(r.b)("p",null,"You can have many files created for each ",Object(r.b)("inlineCode",{parentName:"p"},"OperationGroup")," by processing multiple templates and assigning a different file naming pattern to them. So for a single file per operation:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-java"}),'// process the `api.mustache` template and output a single file with suffix `.java`:\napiTemplateFiles.put("api.mustache", ".java");\n')),Object(r.b)("p",null,"For C-like languages which also require header files, you may create two files per operation."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-objectivec"}),'// create a header and implementation for each operation group:\napiTemplateFiles.put("api-header.mustache", ".h");\napiTemplateFiles.put("api-body.mustache", ".m");\n')),Object(r.b)("p",null,"Here, an Operation with tag ",Object(r.b)("inlineCode",{parentName:"p"},"Pet")," will generate two files: ",Object(r.b)("inlineCode",{parentName:"p"},"SWGPetApi.h")," and ",Object(r.b)("inlineCode",{parentName:"p"},"SWGPetApi.m"),". The ",Object(r.b)("inlineCode",{parentName:"p"},"SWG")," prefix and ",Object(r.b)("inlineCode",{parentName:"p"},"Api")," suffix are options specific to the Objective-C generator."),Object(r.b)("h3",{id:"models"},"Models"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect models passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugModels=true")),Object(r.b)("p",{parentName:"blockquote"},"Execute:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugModels=true\n"))),Object(r.b)("p",null,"Each model identified inside the generator will be passed into the ",Object(r.b)("inlineCode",{parentName:"p"},"Models")," data structure and will generate a new model file (or files) for each model."),Object(r.b)("p",null,"A ",Object(r.b)("inlineCode",{parentName:"p"},"Pet")," model with three properties will provide a ",Object(r.b)("em",{parentName:"p"},"lot")," of information about the type and properties. The output from ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugModels=true")," is presented in truncated format here."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'[ {\n "importPath" : "openapi.Pet",\n "model" : {\n "name" : "Pet",\n "classname" : "Pet",\n "classVarName" : "Pet",\n "modelJson" : "{\\n \\"required\\" : [ \\"id\\", \\"name\\" ],\\n \\"type\\" : \\"object\\",\\n \\"properties\\" : {\\n \\"id\\" : {\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n },\\n \\"name\\" : {\\n \\"type\\" : \\"string\\"\\n },\\n \\"tag\\" : {\\n \\"type\\" : \\"string\\"\\n }\\n }\\n}",\n "dataType" : "map[string]interface{}",\n "classFilename" : "model_pet",\n "isAlias" : false,\n "isString" : false,\n "isInteger" : false,\n "vars" : [ {\n "baseName" : "id",\n "getter" : "getId",\n "setter" : "setId",\n "dataType" : "int64",\n "datatypeWithEnum" : "int64",\n "dataFormat" : "int64",\n "name" : "Id",\n "defaultValueWithParam" : " = data.id;",\n "baseType" : "int64",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"integer\\",\\n \\"format\\" : \\"int64\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : false,\n "isNumeric" : true,\n "isInteger" : false,\n "isLong" : true,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Id",\n "nameInSnakeCase" : "ID",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "int64",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "name",\n "getter" : "getName",\n "setter" : "setName",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Name",\n "defaultValueWithParam" : " = data.name;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : true,\n "hasMoreNonReadOnly" : true,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Name",\n "nameInSnakeCase" : "NAME",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n }, {\n "baseName" : "tag",\n "getter" : "getTag",\n "setter" : "setTag",\n "dataType" : "string",\n "datatypeWithEnum" : "string",\n "name" : "Tag",\n "defaultValueWithParam" : " = data.tag;",\n "baseType" : "string",\n "example" : "null",\n "jsonSchema" : "{\\n \\"type\\" : \\"string\\"\\n}",\n "exclusiveMinimum" : false,\n "exclusiveMaximum" : false,\n "required" : false,\n "hasMoreNonReadOnly" : false,\n "isPrimitiveType" : true,\n "isModel" : false,\n "isContainer" : false,\n "isNotContainer" : true,\n "isString" : true,\n "isNumeric" : false,\n "isInteger" : false,\n "isLong" : false,\n "isNumber" : false,\n "isFloat" : false,\n "isDouble" : false,\n "isByteArray" : false,\n "isBinary" : false,\n "isFile" : false,\n "isBoolean" : false,\n "isDate" : false,\n "isDateTime" : false,\n "isUuid" : false,\n "isEmail" : false,\n "isFreeFormObject" : false,\n "isArray" : false,\n "isMap" : false,\n "isEnum" : false,\n "isReadOnly" : false,\n "isWriteOnly" : false,\n "isNullable" : false,\n "vendorExtensions" : { },\n "hasValidation" : false,\n "isInherited" : false,\n "nameInCamelCase" : "Tag",\n "nameInSnakeCase" : "TAG",\n "isXmlAttribute" : false,\n "isXmlWrapped" : false,\n "datatype" : "string",\n "iexclusiveMaximum" : false\n } ],\n "requiredVars" : [ /* id, name */ ],\n "optionalVars" : [ /* tag */ ],\n "readOnlyVars" : [ ],\n "readWriteVars" : [ /* lists metadata for all three properties */ ],\n "allVars" : [ /* lists all properties */],\n "parentVars" : [ ],\n "mandatory" : [ "id", "name" ],\n "allMandatory" : [ "id", "name" ],\n "imports" : [ ],\n "hasVars" : true,\n "emptyVars" : false,\n "hasMoreModels" : false,\n "hasEnums" : false,\n "isEnum" : false,\n "hasRequired" : true,\n "hasOptional" : true,\n "isArray" : false,\n "hasChildren" : false,\n "isMap" : false,\n "hasOnlyReadOnly" : false,\n "vendorExtensions" : { }\n }\n} ]\n')),Object(r.b)("p",null,"Templates are passed redundant properties, depending on the semantics of the array. For example:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"vars")," lists all defined model properties"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"requiredVars")," lists all model properties marked with ",Object(r.b)("inlineCode",{parentName:"li"},"required")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"optionalVars")," lists all model properties ",Object(r.b)("em",{parentName:"li"},"not")," marked with ",Object(r.b)("inlineCode",{parentName:"li"},"required")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"readWriteVars")," lists all model properties ",Object(r.b)("em",{parentName:"li"},"not")," marked with ",Object(r.b)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"readOnlyVars")," lists all model properties marked with ",Object(r.b)("inlineCode",{parentName:"li"},"readonly")," in the spec document"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"allVars")," lists all model properties. This may include the same set as ",Object(r.b)("inlineCode",{parentName:"li"},"vars"),", but may also include generator-defined properties")),Object(r.b)("p",null,'We expose the same properties in multiple sets because this allows us to conditionally iterate over properties based on some condition ("is it required" or "is it readonly"). This is driven by the use of the logic-less Mustache templates. It is possible that models passed to the templating engine may be cleaned up as we support more template engines, but such an effort will go through a deprecation phase and would be communicated at runtime through log messages.'),Object(r.b)("h3",{id:"supportingfiles"},"supportingFiles"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Inspect supportingFiles passed to templates with system property ",Object(r.b)("inlineCode",{parentName:"p"},"--global-property debugSupportingFiles=true")),Object(r.b)("p",{parentName:"blockquote"},"Execute:"),Object(r.b)("pre",{parentName:"blockquote"},Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"openapi-generator generate -g go \\\n -o out \\\n -i petstore-minimal.yaml \\\n --global-property debugSupportingFiles=true\n"))),Object(r.b)("p",null,'This is a "catch-all" which gives you the entire structure--operations, model, etc--so you can create "single-file" code from them.'),Object(r.b)("p",null,"Supporting files can either be processed through the templating engine or copied as-is. When creating your own templates, you're limited to the files and extensions expected by the generator implementation. For more control over the supporting files produced by a generator, see our ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/customization"}),"customization")," documentation."),Object(r.b)("h2",{id:"variables"},"Variables"),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"This is a very limited list of variable name explanations. Feel free to ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/pull/new/master"}),"open a pull request")," to add to this documentation!")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"complexType"),": stores the name of the model (e.g. Pet)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"isContainer"),": true if the parameter or property is an array or a map."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"isPrimitiveType"),": true if the parameter or property type is a primitive type (e.g. string, integer, etc) as defined in the spec.")),Object(r.b)("h2",{id:"mustache-lambdas"},"Mustache Lambdas"),Object(r.b)("p",null,"Many generators (",Object(r.b)("em",{parentName:"p"},"those extending DefaultCodegen"),") come with a small set of lambda functions available under the key ",Object(r.b)("inlineCode",{parentName:"p"},"lambda"),":"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"lowercase")," - Converts all of the characters in this fragment to lower case using the rules of the ",Object(r.b)("inlineCode",{parentName:"li"},"ROOT")," locale."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"uppercase")," - Converts all of the characters in this fragment to upper case using the rules of the ",Object(r.b)("inlineCode",{parentName:"li"},"ROOT")," locale."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"titlecase")," - Converts text in a fragment to title case. For example ",Object(r.b)("inlineCode",{parentName:"li"},"once upon a time")," to ",Object(r.b)("inlineCode",{parentName:"li"},"Once Upon A Time"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"camelcase")," - Converts text in a fragment to camelCase. For example ",Object(r.b)("inlineCode",{parentName:"li"},"Input-text")," to ",Object(r.b)("inlineCode",{parentName:"li"},"inputText"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented")," - Prepends 4 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_8")," - Prepends 8 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_12")," - Prepends 12 spaces indention from second line of a fragment on. First line will be indented by Mustache."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"indented_16")," -Prepends 16 spaces indention from second line of a fragment on. First line will be indented by Mustache.")),Object(r.b)("p",null,"Lambda is invoked by ",Object(r.b)("inlineCode",{parentName:"p"},"lambda.[lambda name]")," expression. For example: ",Object(r.b)("inlineCode",{parentName:"p"},"{{#lambda.lowercase}}FRAGMENT TO LOWERCASE{{/lambda.lowercase}}")," to lower case text between ",Object(r.b)("inlineCode",{parentName:"p"},"lambda.lowercase"),"."),Object(r.b)("h2",{id:"extensions"},"Extensions"),Object(r.b)("p",null,'OpenAPI supports a concept called "Extensions". These are called "Specification Extensions" ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions"}),"in 3.x"),' and "Vendor Extensions" ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#vendorExtensions"}),"in 2.0"),'.\nYou\'ll see them referred to as "Vendor Extensions" in most places in this project.'),Object(r.b)("p",null,"Vendor extensions allow you to provide vendor-specific configurations to your specification document."),Object(r.b)("p",null,"For example, suppose you use your specification document for code generation with a (hypothetical) C# OpenAPI generator supporting a desired operationId prefix where the extension is ",Object(r.b)("inlineCode",{parentName:"p"},"x-csharp-operationid"),", you can define this property alongside the object you'd like to extend (which would be a Path Object in this case). You could then apply additional extensions alongside this property, whether they're for another language or other tooling."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Well-defined vendor extensions don't cause conflicts with other tooling.")),Object(r.b)("p",null,'The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.'),Object(r.b)("h3",{id:"all-generators-core"},"All generators (core)"),Object(r.b)("h4",{id:"enum"},"Enum"),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-varnames")," can be used to have an other enum name for the corresponding value.\nThis is used to define names of the enum items."),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-descriptions")," can be used to provide an individual description for each value.\nThis is used for comments in the code (like javadoc if the target language is java)."),Object(r.b)("p",null,Object(r.b)("inlineCode",{parentName:"p"},"x-enum-descriptions")," and ",Object(r.b)("inlineCode",{parentName:"p"},"x-enum-varnames")," are each expected to be list of items containing the same number of items as ",Object(r.b)("inlineCode",{parentName:"p"},"enum"),".\nThe order of the items in the list matters: their position is used to group them together."),Object(r.b)("p",null,"Example:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"WeatherType:\n type: integer\n format: int32\n enum:\n - 42\n - 18\n - 56\n x-enum-descriptions:\n - 'Blue sky'\n - 'Slightly overcast'\n - 'Take an umbrella with you'\n x-enum-varnames:\n - Sunny\n - Cloudy\n - Rainy\n")),Object(r.b)("p",null,"In the example for the integer value ",Object(r.b)("inlineCode",{parentName:"p"},"42"),", the description will be ",Object(r.b)("inlineCode",{parentName:"p"},"Blue sky")," and the name of the enum item will be ",Object(r.b)("inlineCode",{parentName:"p"},"Sunny")," (some generators changes it to ",Object(r.b)("inlineCode",{parentName:"p"},"SUNNY")," to respect some coding convention)."),Object(r.b)("h3",{id:"objc"},"ObjC"),Object(r.b)("h4",{id:"x-objc-operationid"},"x-objc-operationId"),Object(r.b)("p",null,"To customize the method name, you can provide a different name in x-objc-operationId, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"summary: Add a new pet to the store\ndescription: ''\noperationId: addPet\nx-objc-operationId: CreateNewPet\n")),Object(r.b)("h3",{id:"java-feign"},"Java (Feign)"),Object(r.b)("h4",{id:"x-accepts"},"x-accepts"),Object(r.b)("p",null,"A single ",Object(r.b)("inlineCode",{parentName:"p"},"Accepts")," value as the Feign API client needs a single value for ",Object(r.b)("inlineCode",{parentName:"p"},"Accepts")," header, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"consumes:\n - application/json\n - application/xml\nx-accepts: application/json\n")),Object(r.b)("h3",{id:"x-content-type"},"x-content-type"),Object(r.b)("p",null,'A single "Content-Type" value as the Feign API client needs a single value for ',Object(r.b)("inlineCode",{parentName:"p"},"Content-Type")," header, e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"produces:\n - application/xml\n - application/json\nx-content-type: application/json\n")),Object(r.b)("h3",{id:"rust-server"},"Rust-server"),Object(r.b)("h4",{id:"x-response-id"},"x-response-id"),Object(r.b)("p",null,"Each response may specify a unique ",Object(r.b)("inlineCode",{parentName:"p"},"x-response-id"),". ",Object(r.b)("inlineCode",{parentName:"p"},"rust-server")," will use this to name the corresponding enum variant in the code. e.g."),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"paths:\n /ping:\n get:\n responses:\n 200:\n description: OK\n x-response-id: Pong\n")),Object(r.b)("h3",{id:"mysql-schema"},"MySQL Schema"),Object(r.b)("h4",{id:"x-mysqlschema"},"x-mysqlSchema"),Object(r.b)("p",null,"MySQL schema generator creates vendor extensions based on openapi ",Object(r.b)("inlineCode",{parentName:"p"},"dataType")," and ",Object(r.b)("inlineCode",{parentName:"p"},"dataFormat"),". When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in ",Object(r.b)("inlineCode",{parentName:"p"},"definitions")," can contain table related and column related extensions like in example below:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"definitions:\n Order:\n description: This should be most common InnoDB table\n type: object\n properties:\n id:\n description: >-\n This column should be unsigned BIGINT with AUTO_INCREMENT\n type: integer\n format: int64\n x-mysqlSchema:\n columnDefinition:\n colName: id\n colDataType: DECIMAL\n colDataTypeArguments:\n - argumentValue: 16\n isString: false\n - argumentValue: 4\n isString: false\n colUnsigned: true\n colNotNull: true\n colDefault:\n defaultValue: AUTO_INCREMENT\n isString: false\n isNumeric: false\n isKeyword: true\n colComment: >-\n Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT\n x-mysqlSchema:\n tableDefinition:\n tblName: orders\n tblStorageEngine: InnoDB\n tblComment: >-\n Table comment. This should be most common InnoDB table\n")),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"There are properties that are not implemented by now(",Object(r.b)("inlineCode",{parentName:"p"},"tblStorageEngine"),"), but you can see how generator can be enhanced in future.")),Object(r.b)("h2",{id:"mustache-tips"},"Mustache Tips"),Object(r.b)("p",null,"Here are a few tips we've found useful for new template authors.\nFor more details on Mustache see ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://mustache.github.io/mustache.5.html"}),"mustache.5"),". See also ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/samskivert/jmustache"}),"samskivert/jmustache")," for implementation-specific details."),Object(r.b)("h3",{id:"firstlast"},"First/Last"),Object(r.b)("p",null,"To access the first or last element in a list using Mustache:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}\n{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}\n")),Object(r.b)("h3",{id:"this"},"This"),Object(r.b)("p",null,"Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept)."),Object(r.b)("p",null,"You can inspect this entire context by outputting ",Object(r.b)("inlineCode",{parentName:"p"},"{{this}}"),". For example:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#operations}}{{this}}{{/operations}}\n")),Object(r.b)("h3",{id:"index"},"Index"),Object(r.b)("p",null,"If you'd like a 1-based index in your array traversal, you can use ",Object(r.b)("inlineCode",{parentName:"p"},"{{-index}}"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-mustache"}),"{{#enums}}{{-index}} {{enum}}{{/enums}}\n")))}c.isMDXComponent=!0},312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return u}));var a=n(0),i=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=i.a.createContext({}),c=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},b=function(e){var t=c(e.components);return i.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},d=Object(a.forwardRef)((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),b=c(n),d=a,u=b["".concat(o,".").concat(d)]||b[d]||m[d]||r;return n?i.a.createElement(u,l({ref:t},p,{components:n})):i.a.createElement(u,l({ref:t},p))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.a.createContext({}),b=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):p({},t,{},e)),n},u=function(e){var t=b(e.components);return a.a.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=b(n),g=r,d=u["".concat(i,".").concat(g)]||u[g]||s[g]||o;return n?a.a.createElement(d,p({ref:t},c,{components:n})):a.a.createElement(d,p({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.a.createContext({}),b=function(e){var t=a.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l({},t,{},e)),n},u=function(e){var t=b(e.components);return a.a.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},g=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=b(n),g=r,d=u["".concat(i,".").concat(g)]||u[g]||s[g]||o;return n?a.a.createElement(d,l({ref:t},c,{components:n})):a.a.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c"," PetApiDeletePetOpts"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"useOneOfDiscriminatorLookup"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"skipReadonlyPropertiesInInt"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Skip default values to the readOnly properties in the model init function./ /false/"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withAWSV4Signature"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include AWS v4 signature support"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withGoCodegenComment"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withXml"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")))),Object(l.b)("h2",{id:"import-mapping"},"IMPORT MAPPING"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Imports"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"instantiation-types"},"INSTANTIATION TYPES"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Instantiated By"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"language-primitives"},"LANGUAGE PRIMITIVES"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"byte"),Object(l.b)("li",null,"complex128"),Object(l.b)("li",null,"complex64"),Object(l.b)("li",null,"float32"),Object(l.b)("li",null,"float64"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"int32"),Object(l.b)("li",null,"int64"),Object(l.b)("li",null,"interface"),Object(l.b)("li",null,"map[string]interface"),Object(l.b)("li",null,"rune"),Object(l.b)("li",null,"string"),Object(l.b)("li",null,"uint"),Object(l.b)("li",null,"uint32"),Object(l.b)("li",null,"uint64")),Object(l.b)("h2",{id:"reserved-words"},"RESERVED WORDS"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"break"),Object(l.b)("li",null,"byte"),Object(l.b)("li",null,"case"),Object(l.b)("li",null,"chan"),Object(l.b)("li",null,"complex128"),Object(l.b)("li",null,"complex64"),Object(l.b)("li",null,"const"),Object(l.b)("li",null,"continue"),Object(l.b)("li",null,"default"),Object(l.b)("li",null,"defer"),Object(l.b)("li",null,"else"),Object(l.b)("li",null,"error"),Object(l.b)("li",null,"fallthrough"),Object(l.b)("li",null,"float32"),Object(l.b)("li",null,"float64"),Object(l.b)("li",null,"for"),Object(l.b)("li",null,"func"),Object(l.b)("li",null,"go"),Object(l.b)("li",null,"goto"),Object(l.b)("li",null,"if"),Object(l.b)("li",null,"import"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"int16"),Object(l.b)("li",null,"int32"),Object(l.b)("li",null,"int64"),Object(l.b)("li",null,"int8"),Object(l.b)("li",null,"interface"),Object(l.b)("li",null,"map"),Object(l.b)("li",null,"nil"),Object(l.b)("li",null,"package"),Object(l.b)("li",null,"range"),Object(l.b)("li",null,"return"),Object(l.b)("li",null,"rune"),Object(l.b)("li",null,"select"),Object(l.b)("li",null,"string"),Object(l.b)("li",null,"struct"),Object(l.b)("li",null,"switch"),Object(l.b)("li",null,"type"),Object(l.b)("li",null,"uint"),Object(l.b)("li",null,"uint16"),Object(l.b)("li",null,"uint32"),Object(l.b)("li",null,"uint64"),Object(l.b)("li",null,"uint8"),Object(l.b)("li",null,"uintptr"),Object(l.b)("li",null,"var")),Object(l.b)("h2",{id:"feature-set"},"FEATURE SET"),Object(l.b)("h3",{id:"client-modification-feature"},"Client Modification Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Authorizations"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"UserAgent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MockServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"data-type-feature"},"Data Type Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int32"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int64"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Float"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Double"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Decimal"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"String"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Byte"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Binary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Boolean"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Date"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"DateTime"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"File"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Array"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Maps"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormat"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormatMulti"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Enum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"documentation-feature"},"Documentation Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Readme"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Model"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Api"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"global-feature"},"Global Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Host"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Info"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Schemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PartialSchemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Consumes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Produces"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ExternalDocumentation"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Examples"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XMLStructureDefinitions"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MultiServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterizedServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterStyling"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Callbacks"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"LinkObjects"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"parameter-feature"},"Parameter Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Path"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Query"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Header"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Body"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormUnencoded"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormMultipart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Cookie"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"schema-support-feature"},"Schema Support Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Simple"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Composite"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Polymorphism"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Union"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"security-feature"},"Security Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasicAuth"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ApiKey"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenIDConnect"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BearerToken"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Implicit"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_ClientCredentials"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_AuthorizationCode"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))),Object(l.b)("h3",{id:"wire-format-feature"},"Wire Format Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"JSON"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XML"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PROTOBUF"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))))}i.isMDXComponent=!0},312:function(t,e,a){"use strict";a.d(e,"a",(function(){return p})),a.d(e,"b",(function(){return m}));var n=a(0),b=a.n(n);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},p=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},u=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),p=i(a),u=n,m=p["".concat(r,".").concat(u)]||p[u]||d[u]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=u;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j"," PetApiDeletePetOpts"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"useOneOfDiscriminatorLookup"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"skipReadonlyPropertiesInInt"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Skip default values to the readOnly properties in the model init function./ /false/"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withAWSV4Signature"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include AWS v4 signature support"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withGoCodegenComment"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"withXml"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null})),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"false")))),Object(l.b)("h2",{id:"import-mapping"},"IMPORT MAPPING"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Imports"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"instantiation-types"},"INSTANTIATION TYPES"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type/Alias"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Instantiated By"))),Object(l.b)("tbody",{parentName:"table"})),Object(l.b)("h2",{id:"language-primitives"},"LANGUAGE PRIMITIVES"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"byte"),Object(l.b)("li",null,"complex128"),Object(l.b)("li",null,"complex64"),Object(l.b)("li",null,"float32"),Object(l.b)("li",null,"float64"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"int32"),Object(l.b)("li",null,"int64"),Object(l.b)("li",null,"interface"),Object(l.b)("li",null,"map[string]interface"),Object(l.b)("li",null,"rune"),Object(l.b)("li",null,"string"),Object(l.b)("li",null,"uint"),Object(l.b)("li",null,"uint32"),Object(l.b)("li",null,"uint64")),Object(l.b)("h2",{id:"reserved-words"},"RESERVED WORDS"),Object(l.b)("ul",{class:"column-ul"},Object(l.b)("li",null,"bool"),Object(l.b)("li",null,"break"),Object(l.b)("li",null,"byte"),Object(l.b)("li",null,"case"),Object(l.b)("li",null,"chan"),Object(l.b)("li",null,"complex128"),Object(l.b)("li",null,"complex64"),Object(l.b)("li",null,"const"),Object(l.b)("li",null,"continue"),Object(l.b)("li",null,"default"),Object(l.b)("li",null,"defer"),Object(l.b)("li",null,"else"),Object(l.b)("li",null,"error"),Object(l.b)("li",null,"fallthrough"),Object(l.b)("li",null,"float32"),Object(l.b)("li",null,"float64"),Object(l.b)("li",null,"for"),Object(l.b)("li",null,"func"),Object(l.b)("li",null,"go"),Object(l.b)("li",null,"goto"),Object(l.b)("li",null,"if"),Object(l.b)("li",null,"import"),Object(l.b)("li",null,"int"),Object(l.b)("li",null,"int16"),Object(l.b)("li",null,"int32"),Object(l.b)("li",null,"int64"),Object(l.b)("li",null,"int8"),Object(l.b)("li",null,"interface"),Object(l.b)("li",null,"map"),Object(l.b)("li",null,"nil"),Object(l.b)("li",null,"package"),Object(l.b)("li",null,"range"),Object(l.b)("li",null,"return"),Object(l.b)("li",null,"rune"),Object(l.b)("li",null,"select"),Object(l.b)("li",null,"string"),Object(l.b)("li",null,"struct"),Object(l.b)("li",null,"switch"),Object(l.b)("li",null,"type"),Object(l.b)("li",null,"uint"),Object(l.b)("li",null,"uint16"),Object(l.b)("li",null,"uint32"),Object(l.b)("li",null,"uint64"),Object(l.b)("li",null,"uint8"),Object(l.b)("li",null,"uintptr"),Object(l.b)("li",null,"var")),Object(l.b)("h2",{id:"feature-set"},"FEATURE SET"),Object(l.b)("h3",{id:"client-modification-feature"},"Client Modification Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Authorizations"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"UserAgent"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MockServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"data-type-feature"},"Data Type Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int32"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Int64"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Float"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Double"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Decimal"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"String"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Byte"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Binary"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Boolean"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Date"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"DateTime"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"File"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Array"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Maps"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormat"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"CollectionFormatMulti"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Enum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ArrayOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfPrimitives"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfModel"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MapOfCollectionOfEnum"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"documentation-feature"},"Documentation Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Readme"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Model"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Api"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")))),Object(l.b)("h3",{id:"global-feature"},"Global Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Host"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasePath"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Info"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Schemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PartialSchemes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Consumes"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Produces"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ExternalDocumentation"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Examples"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XMLStructureDefinitions"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"MultiServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterizedServer"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ParameterStyling"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Callbacks"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"LinkObjects"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"parameter-feature"},"Parameter Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Path"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Query"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Header"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Body"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormUnencoded"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"FormMultipart"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Cookie"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"schema-support-feature"},"Schema Support Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Simple"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Composite"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Polymorphism"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Union"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")))),Object(l.b)("h3",{id:"security-feature"},"Security Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BasicAuth"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ApiKey"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OpenIDConnect"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"BearerToken"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Implicit"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_Password"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_ClientCredentials"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAuth2_AuthorizationCode"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))),Object(l.b)("h3",{id:"wire-format-feature"},"Wire Format Feature"),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Supported"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Defined By"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"JSON"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"XML"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2713"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"PROTOBUF"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ToolingExtension")),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Custom"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"\u2717"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"OAS2,OAS3")))))}i.isMDXComponent=!0},312:function(t,e,a){"use strict";a.d(e,"a",(function(){return p})),a.d(e,"b",(function(){return m}));var n=a(0),b=a.n(n);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function c(t){for(var e=1;e=0||(b[a]=t[a]);return b}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(b[a]=t[a])}return b}var j=b.a.createContext({}),i=function(t){var e=b.a.useContext(j),a=e;return t&&(a="function"==typeof t?t(e):c({},e,{},t)),a},p=function(t){var e=i(t.components);return b.a.createElement(j.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return b.a.createElement(b.a.Fragment,{},e)}},u=Object(n.forwardRef)((function(t,e){var a=t.components,n=t.mdxType,l=t.originalType,r=t.parentName,j=O(t,["components","mdxType","originalType","parentName"]),p=i(a),u=n,m=p["".concat(r,".").concat(u)]||p[u]||d[u]||l;return a?b.a.createElement(m,c({ref:e},j,{components:a})):b.a.createElement(m,c({ref:e},j))}));function m(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var l=a.length,r=new Array(l);r[0]=u;var c={};for(var O in e)hasOwnProperty.call(e,O)&&(c[O]=e[O]);c.originalType=t,c.mdxType="string"==typeof t?t:n,r[1]=c;for(var j=2;j=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=o.a.createContext({}),p=function(e){var t=o.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return o.a.createElement(d.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(n),b=r,f=u["".concat(a,".").concat(b)]||u[b]||s[b]||i;return n?o.a.createElement(f,c({ref:t},d,{components:n})):o.a.createElement(f,c({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var d=2;d=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=o.a.createContext({}),p=function(e){var t=o.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return o.a.createElement(d.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(n),b=r,f=u["".concat(a,".").concat(b)]||u[b]||s[b]||i;return n?o.a.createElement(f,c({ref:t},d,{components:n})):o.a.createElement(f,c({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var d=2;d
-

Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment include:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or electronic address, without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@openapitools.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

Last updated on by Oleh Kurpiak
+

Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment include:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or electronic address, without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@openapitools.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/configuration/index.html b/docs/configuration/index.html index 0ddbfd4fc62..dfbb2c1f66c 100644 --- a/docs/configuration/index.html +++ b/docs/configuration/index.html @@ -27,14 +27,14 @@
-

Configuration Options

Our tooling supports the following types of configuration:

  • global properties
    • properties with cross-cutting concerns which control generation, but don't belong to individual generators
    • Example: debugSupportingFiles prints the contents of template data bound to supporting files
  • config options
    • configuration specific to each individual generator
    • these options are susceptible to validation within the defining generator; a config option of the same name across multiple generators may be validated differently in each
    • NOTE: The CLI accepts config options as "additional properties"
  • additional properties
    • these are the properties which will be passed to templates
    • generally used to pass user-defined properties to custom templates
    • many config options may also be passed as additional properties, however generators will read/modify/rewrite config options
    • users may pass custom additional properties and use these within templates (e.g. a custom generatedBy key with a value of Jim Schubert for inclusion in a custom CVS-like header)
  • top-level properties specific to individual tools/plugins used to bootstrap our tooling

Tool-specific Declarations

The READMEs for the CLI, Gradle Plugin, Maven Plugin, and SBT Plugin may have top-level or tooling specific options which appear to duplicate 'config options' or 'global properties'. Each may also expose user-facing properties slightly differently from the other tools. This may occur due to:

  • Conventions used by the underlying tooling
  • Limitations in underlying frameworks which define how properties must be declared
  • Continuation of support for "legacy" invocation patterns
  • Mistakes in documentation and/or contributions (please do file a bug)

Take, for example, the CLI option of --skip-validate-spec. This flag sets the value to true with no option to set it to false (the default internally). The maven and gradle plugins allow for the top-level option skipValidateSpec to have a value of true or false. The SBT plugin, on the other hand, follows community convention and this property is openApiSkipValidateSpec.

How you provide values to options also depends on the tool. OpenAPI Generator supports global properties for selective generation -- such as apis -- to have either a blank value or a comma-separated list of selected values. We would define this in CLI as --global-property apis or --global-property apis=Equipment. In the Gradle Plugin, these properties are set directly as strings:

openApiGenerate {
globalProperties = [
apis: "",
models: "User:Pet"
]
}

In the Maven plugin, we're limited by XML syntax where <apis/> and <apis></apis> are treated the same as if the apis node was undefined; there's no way to provide an empty string as a default. Instead, we have to extract the global property into its own properties which maintain the two states supported elsewhere (i.e. "all apis" or "select apis"). We have generateApis which accepts a boolean and apisToGenerate which accepts a comma-separated selection list.

Discovering Options

Refer to global properties for a list of available global properties and their usage.

Top-level tooling options are defined in CLI usage. Many of these options directly map to camel case options in other tools, but do refer to plugin documentation for full details or plugin-specific differences.

Config options for generators are available in documentation online. You may also use the CLI to query config options for a target generator using openapi-generator config-help -g <generator-name>. For example:

$ openapi-generator config-help -g mysql-schema
CONFIG OPTIONS
defaultDatabaseName
Default database name for all MySQL queries (Default: )
identifierNamingConvention
Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option (Default: original)
original - Do not transform original names
snake_case - Use snake_case names
jsonDataTypeEnabled
Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true)
namedParametersEnabled
Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled. (Default: false)

This output provides the name of the configuration option. A set of acceptable values for any constrained values will print as an indented list (e.g. identifierNamingConvention above).

Suppose you want to apply snake case naming to mysql schema outputs. Your configuration might resemble the following examples.

CLI

openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case

It may seem like a typo but there are two = signs in the above example.

Maven Plugin

<execution>
<id>mysql-schema</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>spec.yaml</inputSpec>
<generatorName>mysql-schema</generatorName>
<configOptions>
<identifierNamingConvention>snake_case</identifierNamingConvention>
</configOptions>
<output>${project.build.directory}/generated-sources/mysql</output>
</configuration>
</execution>

Gradle Plugin

openApiGenerate {
generatorName = "mysql-schema"
inputSpec = "$rootDir/spec.yaml".toString()
outputDir = "$buildDir/mysql".toString()
configOptions = [
identifierNamingConvention: "snake_case"
]
}
Last updated on by Oleh Kurpiak
+

Configuration Options

Our tooling supports the following types of configuration:

  • global properties
    • properties with cross-cutting concerns which control generation, but don't belong to individual generators
    • Example: debugSupportingFiles prints the contents of template data bound to supporting files
  • config options
    • configuration specific to each individual generator
    • these options are susceptible to validation within the defining generator; a config option of the same name across multiple generators may be validated differently in each
    • NOTE: The CLI accepts config options as "additional properties"
  • additional properties
    • these are the properties which will be passed to templates
    • generally used to pass user-defined properties to custom templates
    • many config options may also be passed as additional properties, however generators will read/modify/rewrite config options
    • users may pass custom additional properties and use these within templates (e.g. a custom generatedBy key with a value of Jim Schubert for inclusion in a custom CVS-like header)
  • top-level properties specific to individual tools/plugins used to bootstrap our tooling

Tool-specific Declarations

The READMEs for the CLI, Gradle Plugin, Maven Plugin, and SBT Plugin may have top-level or tooling specific options which appear to duplicate 'config options' or 'global properties'. Each may also expose user-facing properties slightly differently from the other tools. This may occur due to:

  • Conventions used by the underlying tooling
  • Limitations in underlying frameworks which define how properties must be declared
  • Continuation of support for "legacy" invocation patterns
  • Mistakes in documentation and/or contributions (please do file a bug)

Take, for example, the CLI option of --skip-validate-spec. This flag sets the value to true with no option to set it to false (the default internally). The maven and gradle plugins allow for the top-level option skipValidateSpec to have a value of true or false. The SBT plugin, on the other hand, follows community convention and this property is openApiSkipValidateSpec.

How you provide values to options also depends on the tool. OpenAPI Generator supports global properties for selective generation -- such as apis -- to have either a blank value or a comma-separated list of selected values. We would define this in CLI as --global-property apis or --global-property apis=Equipment. In the Gradle Plugin, these properties are set directly as strings:

openApiGenerate {
globalProperties = [
apis: "",
models: "User:Pet"
]
}

In the Maven plugin, we're limited by XML syntax where <apis/> and <apis></apis> are treated the same as if the apis node was undefined; there's no way to provide an empty string as a default. Instead, we have to extract the global property into its own properties which maintain the two states supported elsewhere (i.e. "all apis" or "select apis"). We have generateApis which accepts a boolean and apisToGenerate which accepts a comma-separated selection list.

Discovering Options

Refer to global properties for a list of available global properties and their usage.

Top-level tooling options are defined in CLI usage. Many of these options directly map to camel case options in other tools, but do refer to plugin documentation for full details or plugin-specific differences.

Config options for generators are available in documentation online. You may also use the CLI to query config options for a target generator using openapi-generator config-help -g <generator-name>. For example:

$ openapi-generator config-help -g mysql-schema
CONFIG OPTIONS
defaultDatabaseName
Default database name for all MySQL queries (Default: )
identifierNamingConvention
Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option (Default: original)
original - Do not transform original names
snake_case - Use snake_case names
jsonDataTypeEnabled
Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true)
namedParametersEnabled
Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled. (Default: false)

This output provides the name of the configuration option. A set of acceptable values for any constrained values will print as an indented list (e.g. identifierNamingConvention above).

Suppose you want to apply snake case naming to mysql schema outputs. Your configuration might resemble the following examples.

CLI

openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case

It may seem like a typo but there are two = signs in the above example.

Maven Plugin

<execution>
<id>mysql-schema</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>spec.yaml</inputSpec>
<generatorName>mysql-schema</generatorName>
<configOptions>
<identifierNamingConvention>snake_case</identifierNamingConvention>
</configOptions>
<output>${project.build.directory}/generated-sources/mysql</output>
</configuration>
</execution>

Gradle Plugin

openApiGenerate {
generatorName = "mysql-schema"
inputSpec = "$rootDir/spec.yaml".toString()
outputDir = "$buildDir/mysql".toString()
configOptions = [
identifierNamingConvention: "snake_case"
]
}
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/contribute-building/index.html b/docs/contribute-building/index.html index e66da99f253..934332e4144 100644 --- a/docs/contribute-building/index.html +++ b/docs/contribute-building/index.html @@ -28,14 +28,14 @@

Building the code

Using Maven

To build from source, you need the following installed and available in your $PATH:

After cloning the project, you can build it from source with this command:

mvn clean install

If you don't have maven installed, you may directly use the included maven wrapper, and build with the command:

./mvnw clean install

Using Docker

You can use run-in-docker.sh to do all development. This script maps your local repository to /gen -in the docker container. It also maps ~/.m2/repository to the appropriate container location.

To execute mvn package:

git clone https://github.com/openapitools/openapi-generator
cd openapi-generator
./run-in-docker.sh mvn package

Build artifacts are now accessible in your working directory.

Once built, run-in-docker.sh will act as an executable for openapi-generator-cli. To generate code, you'll need to output to a directory under /gen (e.g. /gen/out). For example:

./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli
./run-in-docker.sh list # Executes 'list' command for openapi-generator-cli
./run-in-docker.sh /gen/bin/generate-samples.sh /gen/bin/configs/go-petstore.yaml # Builds the Go client
./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go -o /gen/out/go-petstore -p packageName=petstore # generates go client, outputs locally to ./out/go-petstore

Docker in Vagrant

Prerequisite: install Vagrant and VirtualBox.

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator
vagrant up
vagrant ssh
cd /vagrant
./run-in-docker.sh mvn package

Troubleshooting

If an error like this occurs, just execute the mvn clean install -U command:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project openapi-generator: A type incompatibility occurred while executing org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test: java.lang.ExceptionInInitializerError cannot be cast to java.io.IOException

./run-in-docker.sh mvn clean install -U

Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip'

Right now: no solution for this one :|

Last updated on by Oleh Kurpiak
+in the docker container. It also maps ~/.m2/repository to the appropriate container location.

To execute mvn package:

git clone https://github.com/openapitools/openapi-generator
cd openapi-generator
./run-in-docker.sh mvn package

Build artifacts are now accessible in your working directory.

Once built, run-in-docker.sh will act as an executable for openapi-generator-cli. To generate code, you'll need to output to a directory under /gen (e.g. /gen/out). For example:

./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli
./run-in-docker.sh list # Executes 'list' command for openapi-generator-cli
./run-in-docker.sh /gen/bin/generate-samples.sh /gen/bin/configs/go-petstore.yaml # Builds the Go client
./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go -o /gen/out/go-petstore -p packageName=petstore # generates go client, outputs locally to ./out/go-petstore

Docker in Vagrant

Prerequisite: install Vagrant and VirtualBox.

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator
vagrant up
vagrant ssh
cd /vagrant
./run-in-docker.sh mvn package

Troubleshooting

If an error like this occurs, just execute the mvn clean install -U command:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project openapi-generator: A type incompatibility occurred while executing org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test: java.lang.ExceptionInInitializerError cannot be cast to java.io.IOException

./run-in-docker.sh mvn clean install -U

Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip'

Right now: no solution for this one :|

Last updated on by William Cheng
- + - + @@ -49,7 +49,7 @@ in the docker container. It also maps ~/.m2/repository to the appro - + diff --git a/docs/contributing/index.html b/docs/contributing/index.html index a41db712665..3e043515f95 100644 --- a/docs/contributing/index.html +++ b/docs/contributing/index.html @@ -27,14 +27,14 @@
-

Guidelines For Contributing

Before submitting an issue

  • If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: Getting Started
  • Search the open issue and closed issue to ensure no one else has reported something similar before.
  • File an issue ticket by providing all the required information. Failure to provide enough detail may result in slow response from the community.
  • Test with the latest master by building the JAR locally to see if the issue has already been addressed.
  • You can also make a suggestion or ask a question by opening an "issue".

Before submitting a PR

  • Search the open issue to ensure no one else has reported something similar and no one is actively working on similar proposed change.
  • If no one has suggested something similar, open an "issue" with your suggestion to gather feedback from the community.
  • If you're adding a new option to a generator, please consider using the -t option with customized templates instead or start a discussion first by opening an issue as we want to avoid adding too many options to the generator.
  • It's recommended to create a new git branch for the change so that the merge commit message looks nicer in the commit history.

How to contribute

git

If you're new to git, you may find the following FAQs useful:

https://github.com/openapitools/openapi-generator/wiki/FAQ#git

Branches

Please file the pull request against the correct branch, e.g. master for non-breaking changes. See the Git Branches page for more information.

Code generators

All the code generators can be found in modules/openapi-generator/src/main/java/org/openapitools/codegen/languages

If you want to add a new generator, follow the new-generator guide.

Templates

All the templates (mustache) can be found in modules/openapi-generator/src/main/resources.

For a list of variables available in the template, please refer to this page

Style guide

Code change should conform to the programming style guide of the respective languages:

For other languages, feel free to suggest.

You may find the current code base not 100% conform to the coding style and we welcome contributions to fix those.

For Vendor Extensions, please follow the naming convention below:

  • For general vendor extension, use lower case and hyphen. e.g. x-is-unique, x-content-type
  • For language-specified vendor extension, put it in the form of x-{lang}-{extension-name}. e.g. x-objc-operation-id, x-java-feign-retry-limit
  • For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.

Testing

To add test cases (optional) covering the change in the code generator, please refer to modules/openapi-generator/src/test/java/org/openapitools/codegen

To test the templates, please perform the following:

  • Update the Petstore sample by running the shell scripts under the bin folder. For example, run ./bin/generate-samples.sh ./bin/configs/python* to update the Python-related samples under samples. For Windows, please install GIT bash. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
  • During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the -t parameter: -t modules/openapi-generator/src/main/resources/python.
  • Run the tests in the sample folder using maven mvn integration-test -f /path/to/pom.xml, e.g. mvn integration-test -f samples/client/petstore/python/pom.xml. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
  • Finally, git commit the updated samples files: git commit -a (git add -A if added files with new test cases)
  • For new test cases, please add to the Fake Petstore spec

To start the CI tests, you can:

  • Run mvn verify -Psamples, assuming you have all the required tools installed to run tests for different languages.
  • Leverage http://travis-ci.org to run the CI tests by adding your own openapi-generator repository.
  • Run some of the CI tests in your local workspace.

See OpenAPI Tools wiki for more information about the integration tests.

Tips

  • Smaller changes are easier to review
  • [Optional] For bug fixes, provide a OpenAPI Spec to repeat the issue so that the reviewer can use it to confirm the fix
  • Add test case(s) to cover the change
  • Document the fix in the code to make the code more readable
  • Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests)
  • File a PR with meaningful title, description and commit messages
  • Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
  • Recommended git settings
    • git config core.autocrlf input to tell Git convert CRLF to LF on commit but not the other way around
  • To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. fix #1542. (Ref: closing issues using keywords)
Last updated on by Oleh Kurpiak
+

Guidelines For Contributing

Before submitting an issue

  • If you're not using the latest master to generate API clients or server stubs, please give it another try by pulling the latest master as the issue may have already been addressed. Ref: Getting Started
  • Search the open issue and closed issue to ensure no one else has reported something similar before.
  • File an issue ticket by providing all the required information. Failure to provide enough detail may result in slow response from the community.
  • Test with the latest master by building the JAR locally to see if the issue has already been addressed.
  • You can also make a suggestion or ask a question by opening an "issue".

Before submitting a PR

  • Search the open issue to ensure no one else has reported something similar and no one is actively working on similar proposed change.
  • If no one has suggested something similar, open an "issue" with your suggestion to gather feedback from the community.
  • If you're adding a new option to a generator, please consider using the -t option with customized templates instead or start a discussion first by opening an issue as we want to avoid adding too many options to the generator.
  • It's recommended to create a new git branch for the change so that the merge commit message looks nicer in the commit history.

How to contribute

git

If you're new to git, you may find the following FAQs useful:

https://github.com/openapitools/openapi-generator/wiki/FAQ#git

Branches

Please file the pull request against the correct branch, e.g. master for non-breaking changes. See the Git Branches page for more information.

Code generators

All the code generators can be found in modules/openapi-generator/src/main/java/org/openapitools/codegen/languages

If you want to add a new generator, follow the new-generator guide.

Templates

All the templates (mustache) can be found in modules/openapi-generator/src/main/resources.

For a list of variables available in the template, please refer to this page

Style guide

Code change should conform to the programming style guide of the respective languages:

For other languages, feel free to suggest.

You may find the current code base not 100% conform to the coding style and we welcome contributions to fix those.

For Vendor Extensions, please follow the naming convention below:

  • For general vendor extension, use lower case and hyphen. e.g. x-is-unique, x-content-type
  • For language-specified vendor extension, put it in the form of x-{lang}-{extension-name}. e.g. x-objc-operation-id, x-java-feign-retry-limit
  • For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.

Testing

To add test cases (optional) covering the change in the code generator, please refer to modules/openapi-generator/src/test/java/org/openapitools/codegen

To test the templates, please perform the following:

  • Update the Petstore sample by running the shell scripts under the bin folder. For example, run ./bin/generate-samples.sh ./bin/configs/python* to update the Python-related samples under samples. For Windows, please install GIT bash. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
  • During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the -t parameter: -t modules/openapi-generator/src/main/resources/python.
  • Run the tests in the sample folder using maven mvn integration-test -f /path/to/pom.xml, e.g. mvn integration-test -f samples/client/petstore/python/pom.xml. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
  • Finally, git commit the updated samples files: git commit -a (git add -A if added files with new test cases)
  • For new test cases, please add to the Fake Petstore spec

To start the CI tests, you can:

  • Run mvn verify -Psamples, assuming you have all the required tools installed to run tests for different languages.
  • Leverage http://travis-ci.org to run the CI tests by adding your own openapi-generator repository.
  • Run some of the CI tests in your local workspace.

See OpenAPI Tools wiki for more information about the integration tests.

Tips

  • Smaller changes are easier to review
  • [Optional] For bug fixes, provide a OpenAPI Spec to repeat the issue so that the reviewer can use it to confirm the fix
  • Add test case(s) to cover the change
  • Document the fix in the code to make the code more readable
  • Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests)
  • File a PR with meaningful title, description and commit messages
  • Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
  • Recommended git settings
    • git config core.autocrlf input to tell Git convert CRLF to LF on commit but not the other way around
  • To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. fix #1542. (Ref: closing issues using keywords)
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/core-team/index.html b/docs/core-team/index.html index 609cdee4858..d54cc0b1d06 100644 --- a/docs/core-team/index.html +++ b/docs/core-team/index.html @@ -27,14 +27,14 @@
-
Last updated on by Oleh Kurpiak
+
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/customization/index.html b/docs/customization/index.html index 2eddd8c79e5..11f4fde4a45 100644 --- a/docs/customization/index.html +++ b/docs/customization/index.html @@ -33,14 +33,14 @@ These options default to true and don't limit the generation of the feature These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with -p {optionName}={optionValue}. (If -p {optionName} does not work, please open a ticket and we'll look into it)

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -g java

Output

CONFIG OPTIONS
modelPackage
package for generated models
apiPackage
package for generated api classes
...... (results omitted)
library
library template (sub-template) to use:
jersey1 - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2
jersey2 - HTTP client: Jersey client 2.6
feign - HTTP client: Netflix Feign 8.1.1. JSON processing: Jackson 2.6.3
okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1
retrofit - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1 (Retrofit 1.9.0)
retrofit2 - HTTP client: OkHttp 2.5.0. JSON processing: Gson 2.4 (Retrofit 2.0.0-beta2)
google-api-client - HTTP client: google-api-client 1.23.0. JSON processing: Jackson 2.8.9
rest-assured - HTTP client: rest-assured : 4.3.0. JSON processing: Gson 2.8.6. Only for Java8

Your config file for Java can look like

{
"groupId":"com.my.company",
"artifactId":"MyClient",
"artifactVersion":"1.2.0",
"library":"feign"
}

Or if you prefer yaml format it can look like

groupId: "com.my.company"
artifactId: "MyClient"
artifactVersion: "1.2.0"
library: "feign"

For all the unspecified options default values will be used.

Another way to override default options is to extend the config class for the specific language. To change, for example, the prefix for the Objective-C generated files, simply subclass the ObjcClientCodegen.java:

package com.mycompany.openapitools.codegen;
import org.openapitools.codegen.languages.*;
public class MyObjcCodegen extends ObjcClientCodegen {
static {
PREFIX = "HELLO";
}
}

and specify the classname when running the generator:

-g com.mycompany.openapitools.codegen.MyObjcCodegen

Your subclass will now be loaded and overrides the PREFIX value in the superclass.

Bringing your own models

Sometimes you don't want a model generated. In this case, you can simply specify an import mapping to tell the codegen what not to create. When doing this, every location that references a specific model will -refer back to your classes. Note, this may not apply to all languages...

To specify an import mapping, use the --import-mappings argument and specify the model-to-import logic as such:

--import-mappings Pet=my.models.MyPet

Or for multiple mappings:

--import-mappings Pet=my.models.MyPet,Order=my.models.MyOrder

or

--import-mappings Pet=my.models.MyPet --import-mappings Order=my.models.MyOrder
Last updated on by Oleh Kurpiak
+refer back to your classes. Note, this may not apply to all languages...

To specify an import mapping, use the --import-mappings argument and specify the model-to-import logic as such:

--import-mappings Pet=my.models.MyPet

Or for multiple mappings:

--import-mappings Pet=my.models.MyPet,Order=my.models.MyOrder

or

--import-mappings Pet=my.models.MyPet --import-mappings Order=my.models.MyOrder
Last updated on by William Cheng
- + - + @@ -54,7 +54,7 @@ refer back to your classes. Note, this may not apply to all languages...

- + diff --git a/docs/debugging/index.html b/docs/debugging/index.html index 27a24823ba4..70766818096 100644 --- a/docs/debugging/index.html +++ b/docs/debugging/index.html @@ -27,14 +27,14 @@

-

Debugging

Generation

As a user there may be times when generated outputs don't match your expectations it's unclear why. The CLI supports a --dry-run option which may be used to inspect the anticipated file operations without making changes to the file system.

Suppose you generate using the --minimal-update option, and you notice on subsequent generations of a client that no files have changed. This is by design.

For example, if you generate the aspnetcore generator passing --minimal-update --dry-run to the sample generation script in the code repository:

export JAVA_OPTS="-Dlog.level=off"
./bin/generate-samples.sh ./bin/configs/lua.yaml -- --minimal-update --dry-run

You'll see the output similar to the following:

$ ./bin/generate-samples.sh ./bin/configs/lua.yaml -- --minimal-update --dry-run
# START SCRIPT: ./bin/generate-samples.sh
This script generates all configs under bin/configs by default.
You may generate a targeted script or set of scripts using glob patterns.
For example:
./bin/generate-samples.sh bin/configs/java-*
You may generate a single config with additional options if you use -- to
separate the single config file from the generator arguments.
For example:
./bin/generate-samples.sh bin/configs/java-vertx.yaml -- --global-property debugModels=true
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=true
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: lua (client)
[main] INFO o.o.codegen.DefaultGenerator - Generator 'lua' is considered beta.
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] INFO o.o.codegen.DefaultGenerator - Model inline_object (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)
[main] INFO o.o.codegen.DefaultGenerator - Model inline_object_1 (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN o.o.codegen.DefaultCodegen - Multiple MediaTypes found, using only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] ERROR o.o.codegen.DefaultGenerator -
Dry Run Results:
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator-ignore
n /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator/VERSION
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/api_response_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/category_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_1_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/order_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/store_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/tag_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_spec.lua
States:
- w Write
- n Write if New/Updated
- i Ignored
- s Skipped Overwrite
- k Skipped by user option(s)
- e Error evaluating file write state
[main] ERROR o.o.codegen.DefaultGenerator -
Dry Run Results:
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator-ignore
n /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator/VERSION
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/api_response_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/category_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_1_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/order_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/store_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/tag_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_spec.lua
States:
- w Write
- n Write if New/Updated
- i Ignored
- s Skipped Overwrite
- k Skipped by user option(s)
- e Error evaluating file write state

The output lists the files which would be written in a normal run of the tool. Notice that we skip .openapi-generator-ignore because the file exists and we don't want to blow away the user's generation rules. Most of these files will overwrite output files only if the contents slated for write are different from those on the filesystem; this is denoted by an n preceding the filename. Some of the above lines begin with a w, meaning these files will always result in a write operation.

If you find an operation that you feel should result in a different state, please open an issue or submit a pull request to change the behavior (we welcome all contributions).

Templates

Sometimes, you may have issues with variables in your templates. As discussed in the templating docs, we offer a variety of system properties for inspecting the models bound to templates.

--global-property debugOpenAPI
Prints out the JSON model of the OpenAPI Document, as seen by OpenAPI Generator
--global-property debugModels
Prints out the JSON model passed to model templates
--global-property debugOperations
Prints out the JSON model passed to operation (api) templates
--global-property debugSupportingFiles
Prints out the JSON model passed to supporting files

One or more of these properties can be passed alongside other command line options:

openapi-generator generate -g go \
-o out \
-i petstore-minimal.yaml \
--global-property debugModels,debugOperations

Or you can add these to your JAVA_OPTS environment variable (this applies to every invocation of the tool):

export JAVA_OPTS="${JAVA_OPTS} --global-property debugModels,debugOperations"

NOTE: Globally available system options like these will apply to all invocations of the generator (CLI and plugins)

Runtime

When you're working with a custom generator, a new generator, or otherwise trying to understand the behavior of the toolset, you may need to attach a remote debugger in order to step through the code.

The steps are shown here for a specific version of the generator, but apply the same if you're working off master or a feature branch.

  • Determine the version of openapi-generator you're using. For the CLI, this is:
    openapi-generator version
  • Navigate to the openapi-generator source directory (see building docs for obtaining source code and brief introduction).
  • Checkout the branch/tag for the target version. Branches are not prefixed, but tags are prefixed with a v. For instance if you're using version 3.3.0, you will execute:
    git checkout v3.3.0
  • Open the project in your IDE.
  • Setup your IDE for remote debugging. You'll want to define a port used for connecting the remote debugger. For this example, we'll use 5005. See external tutorials for IntelliJ and Eclipse
  • Export the debug configuration, specifying suspend=y so you have time to attach a remote debugger. These are passed as Java system properties, either on command line or as part of the JAVA_OPTS environment variable. This will look like:
    export JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
  • Execute the generator with your desired options. You should see the application output only
    Listening for transport dt_socket at address: 5005
  • Set breakpoints in code, and then attach your remote debugger from your IDE (see above). The generator will automatically unblock once the remote debugger is attached. You can now step through the code.

Logs

You can try to enable debugging log with -Dlog.level=debug option to the JAVA_OPTS environment variable to see more information:

export JAVA_OPTS="${JAVA_OPTS} -Dlog.level=debug"

Set the option then DEBUG logs are printed out:

openapi-generator generate -g go ...
...
...
[main] DEBUG o.o.codegen.DefaultCodegen - debugging fromProperty for files : class Schema {
type: null
format: null
$ref: #/components/schemas/File
...
...
Last updated on by Oleh Kurpiak
+

Debugging

Generation

As a user there may be times when generated outputs don't match your expectations it's unclear why. The CLI supports a --dry-run option which may be used to inspect the anticipated file operations without making changes to the file system.

Suppose you generate using the --minimal-update option, and you notice on subsequent generations of a client that no files have changed. This is by design.

For example, if you generate the aspnetcore generator passing --minimal-update --dry-run to the sample generation script in the code repository:

export JAVA_OPTS="-Dlog.level=off"
./bin/generate-samples.sh ./bin/configs/lua.yaml -- --minimal-update --dry-run

You'll see the output similar to the following:

$ ./bin/generate-samples.sh ./bin/configs/lua.yaml -- --minimal-update --dry-run
# START SCRIPT: ./bin/generate-samples.sh
This script generates all configs under bin/configs by default.
You may generate a targeted script or set of scripts using glob patterns.
For example:
./bin/generate-samples.sh bin/configs/java-*
You may generate a single config with additional options if you use -- to
separate the single config file from the generator arguments.
For example:
./bin/generate-samples.sh bin/configs/java-vertx.yaml -- --global-property debugModels=true
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=true
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: lua (client)
[main] INFO o.o.codegen.DefaultGenerator - Generator 'lua' is considered beta.
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] INFO o.o.codegen.DefaultGenerator - Model inline_object (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)
[main] INFO o.o.codegen.DefaultGenerator - Model inline_object_1 (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN o.o.codegen.DefaultCodegen - Multiple MediaTypes found, using only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/xml)
[main] ERROR o.o.codegen.DefaultGenerator -
Dry Run Results:
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator-ignore
n /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator/VERSION
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/api_response_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/category_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_1_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/order_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/store_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/tag_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_spec.lua
States:
- w Write
- n Write if New/Updated
- i Ignored
- s Skipped Overwrite
- k Skipped by user option(s)
- e Error evaluating file write state
[main] ERROR o.o.codegen.DefaultGenerator -
Dry Run Results:
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator-ignore
n /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/.openapi-generator/VERSION
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/api_response_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/category_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_1_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/inline_object_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/order_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/pet_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/store_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/tag_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_api_spec.lua
k /Users/williamcheng/Code/openapi-generator/samples/client/petstore/lua/spec/user_spec.lua
States:
- w Write
- n Write if New/Updated
- i Ignored
- s Skipped Overwrite
- k Skipped by user option(s)
- e Error evaluating file write state

The output lists the files which would be written in a normal run of the tool. Notice that we skip .openapi-generator-ignore because the file exists and we don't want to blow away the user's generation rules. Most of these files will overwrite output files only if the contents slated for write are different from those on the filesystem; this is denoted by an n preceding the filename. Some of the above lines begin with a w, meaning these files will always result in a write operation.

If you find an operation that you feel should result in a different state, please open an issue or submit a pull request to change the behavior (we welcome all contributions).

Templates

Sometimes, you may have issues with variables in your templates. As discussed in the templating docs, we offer a variety of system properties for inspecting the models bound to templates.

--global-property debugOpenAPI
Prints out the JSON model of the OpenAPI Document, as seen by OpenAPI Generator
--global-property debugModels
Prints out the JSON model passed to model templates
--global-property debugOperations
Prints out the JSON model passed to operation (api) templates
--global-property debugSupportingFiles
Prints out the JSON model passed to supporting files

One or more of these properties can be passed alongside other command line options:

openapi-generator generate -g go \
-o out \
-i petstore-minimal.yaml \
--global-property debugModels,debugOperations

Or you can add these to your JAVA_OPTS environment variable (this applies to every invocation of the tool):

export JAVA_OPTS="${JAVA_OPTS} --global-property debugModels,debugOperations"

NOTE: Globally available system options like these will apply to all invocations of the generator (CLI and plugins)

Runtime

When you're working with a custom generator, a new generator, or otherwise trying to understand the behavior of the toolset, you may need to attach a remote debugger in order to step through the code.

The steps are shown here for a specific version of the generator, but apply the same if you're working off master or a feature branch.

  • Determine the version of openapi-generator you're using. For the CLI, this is:
    openapi-generator version
  • Navigate to the openapi-generator source directory (see building docs for obtaining source code and brief introduction).
  • Checkout the branch/tag for the target version. Branches are not prefixed, but tags are prefixed with a v. For instance if you're using version 3.3.0, you will execute:
    git checkout v3.3.0
  • Open the project in your IDE.
  • Setup your IDE for remote debugging. You'll want to define a port used for connecting the remote debugger. For this example, we'll use 5005. See external tutorials for IntelliJ and Eclipse
  • Export the debug configuration, specifying suspend=y so you have time to attach a remote debugger. These are passed as Java system properties, either on command line or as part of the JAVA_OPTS environment variable. This will look like:
    export JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
  • Execute the generator with your desired options. You should see the application output only
    Listening for transport dt_socket at address: 5005
  • Set breakpoints in code, and then attach your remote debugger from your IDE (see above). The generator will automatically unblock once the remote debugger is attached. You can now step through the code.

Logs

You can try to enable debugging log with -Dlog.level=debug option to the JAVA_OPTS environment variable to see more information:

export JAVA_OPTS="${JAVA_OPTS} -Dlog.level=debug"

Set the option then DEBUG logs are printed out:

openapi-generator generate -g go ...
...
...
[main] DEBUG o.o.codegen.DefaultCodegen - debugging fromProperty for files : class Schema {
type: null
format: null
$ref: #/components/schemas/File
...
...
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/faq-contributing/index.html b/docs/faq-contributing/index.html index 57629d06443..56652706d93 100644 --- a/docs/faq-contributing/index.html +++ b/docs/faq-contributing/index.html @@ -33,14 +33,14 @@ 4) make changes 5) git commit -a (you may need to use git add filename to add new files) 6) git push origin fix_issue9999 -7) Visit https://github.com/openapitools/openapi-generator in your browser and click on the button to file a new PR based on fix_issue9999

Last updated on by Oleh Kurpiak
+7) Visit https://github.com/openapitools/openapi-generator in your browser and click on the button to file a new PR based on fix_issue9999

Last updated on by William Cheng
- + - + @@ -54,7 +54,7 @@ - + diff --git a/docs/faq-extending/index.html b/docs/faq-extending/index.html index 42571960971..012593dcbf8 100644 --- a/docs/faq-extending/index.html +++ b/docs/faq-extending/index.html @@ -27,14 +27,14 @@
-

FAQ: Extending

How do I use my own Java models?

See Bringing your own Models.

How do I disable certificate verification?

Please add -Dio.swagger.v3.parser.util.RemoteUrl.trustAll=true when generating the code.

How do I skip files during code generation?

OpenAPI Generator has a built-in ignore file processor.

For example, to skip git_push.sh, one can create a file named .openapi-generator-ignore in the root of the output directory with the contents:

# Prevent generator from creating these files:
git_push.sh

The ignore file works just like .gitignore, and it is auto-generated by default.

If you need this functionality on initial generation, you can provide the option --ignore-file-override (CLI) or ignoreFileOverride (Maven and Gradle plugins) with a value targeting any existing file. The contents of that file will be evaluated relative to the output directory.

How can I customize the auto-generated code?

Variants:

  • "How can I add a header/footer to generated code?"
  • "How can I add my own logging to generated code?"
  • "How can I add my license to the top of files?"

OpenAPI Generator supports user-defined templates without need to recompile the artifact. We also support custom generators (templates and logic) if those generators are accessible on the classpath.

See templating: Modifying Templates and customization docs for more details.

Last updated on by Oleh Kurpiak
+

FAQ: Extending

How do I use my own Java models?

See Bringing your own Models.

How do I disable certificate verification?

Please add -Dio.swagger.v3.parser.util.RemoteUrl.trustAll=true when generating the code.

How do I skip files during code generation?

OpenAPI Generator has a built-in ignore file processor.

For example, to skip git_push.sh, one can create a file named .openapi-generator-ignore in the root of the output directory with the contents:

# Prevent generator from creating these files:
git_push.sh

The ignore file works just like .gitignore, and it is auto-generated by default.

If you need this functionality on initial generation, you can provide the option --ignore-file-override (CLI) or ignoreFileOverride (Maven and Gradle plugins) with a value targeting any existing file. The contents of that file will be evaluated relative to the output directory.

How can I customize the auto-generated code?

Variants:

  • "How can I add a header/footer to generated code?"
  • "How can I add my own logging to generated code?"
  • "How can I add my license to the top of files?"

OpenAPI Generator supports user-defined templates without need to recompile the artifact. We also support custom generators (templates and logic) if those generators are accessible on the classpath.

See templating: Modifying Templates and customization docs for more details.

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/faq-generators/index.html b/docs/faq-generators/index.html index 89b104168dc..d70277212bf 100644 --- a/docs/faq-generators/index.html +++ b/docs/faq-generators/index.html @@ -27,14 +27,14 @@
-

FAQ: Generators

What are some server generator use cases?

We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for ASP.NET and Azure Functions (to name only a few).

Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators:

  • prototyping - one can generate the server code and have a functional API backend very quickly to try different things or features.
  • mocking - easily provide an API backend for mocking based on the examples field defined in the response object.
  • migration - let's say one wants to migrate an API backend from Ruby on Rails to Java Spring. The server generator can save a lot of time in implementing and verify each endpoint in the new API backend.
  • evaluating - when you want to try a new language or framework, and a typical "Hello, World" is too trivial.

Java

The API client has SSL errors due to an invalid certificate. Is there a way to bypass that?

Yes, please refer to http://stackoverflow.com/a/6055903/677735

How can I customize the Feign client templates?

You will need to provide customized files in Java/libraries/feign under the resources folder and pass the location via the -t option.

In your Gradle build script, please add the following (example):

config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign

Android

How can I generate an Android SDK?

The Java SDK is also compatible with Android.

[RECOMMENDED] To generate the Java SDK with okhttp and gson libraries, run the following:

mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
-l java --library=okhttp-gson \
--additional-properties hideGenerationTimestamp=true \
-o /var/tmp/java/okhttp-gson/

You can also generate the Java SDK with other HTTP libraries by replacing okhttp-gson with retrofit for example. For a list of support libraries, please run

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java

To generate the Android SDK with volley, please run

mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
-l android --library=volley \
-o /var/tmp/android/volley/

We do not recommend using the default HTTP library (Apache HttpClient) with android as it's not actively maintained.

C-Sharp

How do I fix CSC: warning CS2002 in Xamarin?

The full warning might look like this: CSC: warning CS2002: Source file 'Api/FakeApi.cs' specified multiple times

The warning has no impact on the build process so you should be able to build the solution without issue. The warning should be addressed in the upcoming stable release of Xamarin.

Objective-C

How do I run integration test with Petstore ObjC API client?

Here are the steps:

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/objc/default/OpenAPIClientTests
mvn integration-test

Besides default (folder) ObjC API client, there's also core-data for another ObjC API client with Core Data support.

Swift

How do I run integration test with Petstore Swift API client?

Here are the steps:

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/swift/default/OpenAPIClientTests
mvn integration-test

Besides default (folder), there's another folder promisekit for Swift API client with PromiseKit support

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/swift/promisekit/OpenAPIClientTests
mvn integration-test

Is Swift (2.x) generator still actively maintained?

No, please use swift3 or swift4 generator instead as we want to focus on Swift 3.x, 4.x.

TypeScript

The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?

Yes, please use the following option when generating TypeScript clients:

modelPropertyNaming
Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)
Last updated on by Oleh Kurpiak
+

FAQ: Generators

What are some server generator use cases?

We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for ASP.NET and Azure Functions (to name only a few).

Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators:

  • prototyping - one can generate the server code and have a functional API backend very quickly to try different things or features.
  • mocking - easily provide an API backend for mocking based on the examples field defined in the response object.
  • migration - let's say one wants to migrate an API backend from Ruby on Rails to Java Spring. The server generator can save a lot of time in implementing and verify each endpoint in the new API backend.
  • evaluating - when you want to try a new language or framework, and a typical "Hello, World" is too trivial.

Java

The API client has SSL errors due to an invalid certificate. Is there a way to bypass that?

Yes, please refer to http://stackoverflow.com/a/6055903/677735

How can I customize the Feign client templates?

You will need to provide customized files in Java/libraries/feign under the resources folder and pass the location via the -t option.

In your Gradle build script, please add the following (example):

config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign

Android

How can I generate an Android SDK?

The Java SDK is also compatible with Android.

[RECOMMENDED] To generate the Java SDK with okhttp and gson libraries, run the following:

mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
-l java --library=okhttp-gson \
--additional-properties hideGenerationTimestamp=true \
-o /var/tmp/java/okhttp-gson/

You can also generate the Java SDK with other HTTP libraries by replacing okhttp-gson with retrofit for example. For a list of support libraries, please run

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l java

To generate the Android SDK with volley, please run

mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
-l android --library=volley \
-o /var/tmp/android/volley/

We do not recommend using the default HTTP library (Apache HttpClient) with android as it's not actively maintained.

C-Sharp

How do I fix CSC: warning CS2002 in Xamarin?

The full warning might look like this: CSC: warning CS2002: Source file 'Api/FakeApi.cs' specified multiple times

The warning has no impact on the build process so you should be able to build the solution without issue. The warning should be addressed in the upcoming stable release of Xamarin.

Objective-C

How do I run integration test with Petstore ObjC API client?

Here are the steps:

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/objc/default/OpenAPIClientTests
mvn integration-test

Besides default (folder) ObjC API client, there's also core-data for another ObjC API client with Core Data support.

Swift

How do I run integration test with Petstore Swift API client?

Here are the steps:

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/swift/default/OpenAPIClientTests
mvn integration-test

Besides default (folder), there's another folder promisekit for Swift API client with PromiseKit support

git clone https://github.com/openapitools/openapi-generator.git
cd openapi-generator/samples/client/petstore/swift/promisekit/OpenAPIClientTests
mvn integration-test

Is Swift (2.x) generator still actively maintained?

No, please use swift3 or swift4 generator instead as we want to focus on Swift 3.x, 4.x.

TypeScript

The JSON response fails to deserialize due to change in variable naming (snake_case to camelCase). Is there any way to keep the original naming?

Yes, please use the following option when generating TypeScript clients:

modelPropertyNaming
Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/faq/index.html b/docs/faq/index.html index 9abd85774df..dc17f3ec268 100644 --- a/docs/faq/index.html +++ b/docs/faq/index.html @@ -27,14 +27,14 @@
-

FAQ: General

Do you have a chat room?

Join the Slack chat room

What is the governance structure of the OpenAPI Generator project?

OpenAPI generator (openapi-generator) is managed by the members of the core team.

What is the difference between Swagger Codegen and OpenAPI Generator?

Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members. For more details, see the Fork Q&A.

Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only.

Last updated on by Oleh Kurpiak
+

FAQ: General

Do you have a chat room?

Join the Slack chat room

What is the governance structure of the OpenAPI Generator project?

OpenAPI generator (openapi-generator) is managed by the members of the core team.

What is the difference between Swagger Codegen and OpenAPI Generator?

Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members. For more details, see the Fork Q&A.

Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only.

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/file-post-processing/index.html b/docs/file-post-processing/index.html index e1474413dcb..3859c9f1a96 100644 --- a/docs/file-post-processing/index.html +++ b/docs/file-post-processing/index.html @@ -27,14 +27,14 @@
-

File post-processing

Each tool (CLI and plugins) supports enabling file post-processing at a high-level. Enabling this option allows for generators which support post-processing to call some external process for each generated file, passing the file path to that tool. The external tool must be defined in an environment variable supported by the generator.

Note that:

  • this option is --enable-post-process-file in the CLI and enablePostProcessFile in plugins
  • we require both specifying the environment variable and enabling the option at the tooling level; this feature is opt-in for security
  • file processing occurs one at a time
  • the external tool may be a custom script which invokes multiple tools

Also refer to the relevant documentation for CLI, Maven Plugin, Gradle Plugin, or SBT Plugin.

Supported Environment Variables

The following environment variables are supported by their respective generators:

  • CPP_POST_PROCESS_FILE
  • CSHARP_POST_PROCESS_FILE
  • C_POST_PROCESS_FILE
  • DART_POST_PROCESS_FILE
  • FSHARP_POST_PROCESS_FILE
  • GO_POST_PROCESS_FILE
  • HASKELL_POST_PROCESS_FILE
  • JAVA_POST_PROCESS_FILE
  • JS_POST_PROCESS_FILE
  • KOTLIN_POST_PROCESS_FILE
  • OCAML_POST_PROCESS_FILE
  • PERL_POST_PROCESS_FILE
  • PHP_POST_PROCESS_FILE
  • POWERSHELL_POST_PROCESS_FILE
  • PYTHON_POST_PROCESS_FILE
  • RUBY_POST_PROCESS_FILE
  • RUST_POST_PROCESS_FILE
  • SCALA_POST_PROCESS_FILE
  • SWIFT_POST_PROCESS_FILE
  • TS_POST_PROCESS_FILE

Example

Let's see how to pass Ruby generated files to Rubocop, a static code analysis/linter/formatter tool.

# First, export the required environment variable
export RUBY_POST_PROCESS_FILE="/usr/local/bin/rubocop -a"
export OPENAPI_DOC="https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
# Invoke the generator with --enable-post-process-file
openapi-generator generate --enable-post-process-file -i $OPENAPI_DOC -g ruby -o .out-ruby/

You will now see messages logged about which files have been processed:

[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.rspec
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb
[main] INFO o.o.codegen.TemplateManager - Skipped /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/VERSION
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/FILES
Last updated on by Oleh Kurpiak
+

File post-processing

Each tool (CLI and plugins) supports enabling file post-processing at a high-level. Enabling this option allows for generators which support post-processing to call some external process for each generated file, passing the file path to that tool. The external tool must be defined in an environment variable supported by the generator.

Note that:

  • this option is --enable-post-process-file in the CLI and enablePostProcessFile in plugins
  • we require both specifying the environment variable and enabling the option at the tooling level; this feature is opt-in for security
  • file processing occurs one at a time
  • the external tool may be a custom script which invokes multiple tools

Also refer to the relevant documentation for CLI, Maven Plugin, Gradle Plugin, or SBT Plugin.

Supported Environment Variables

The following environment variables are supported by their respective generators:

  • CPP_POST_PROCESS_FILE
  • CSHARP_POST_PROCESS_FILE
  • C_POST_PROCESS_FILE
  • DART_POST_PROCESS_FILE
  • FSHARP_POST_PROCESS_FILE
  • GO_POST_PROCESS_FILE
  • HASKELL_POST_PROCESS_FILE
  • JAVA_POST_PROCESS_FILE
  • JS_POST_PROCESS_FILE
  • KOTLIN_POST_PROCESS_FILE
  • OCAML_POST_PROCESS_FILE
  • PERL_POST_PROCESS_FILE
  • PHP_POST_PROCESS_FILE
  • POWERSHELL_POST_PROCESS_FILE
  • PYTHON_POST_PROCESS_FILE
  • RUBY_POST_PROCESS_FILE
  • RUST_POST_PROCESS_FILE
  • SCALA_POST_PROCESS_FILE
  • SWIFT_POST_PROCESS_FILE
  • TS_POST_PROCESS_FILE

Example

Let's see how to pass Ruby generated files to Rubocop, a static code analysis/linter/formatter tool.

# First, export the required environment variable
export RUBY_POST_PROCESS_FILE="/usr/local/bin/rubocop -a"
export OPENAPI_DOC="https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
# Invoke the generator with --enable-post-process-file
openapi-generator generate --enable-post-process-file -i $OPENAPI_DOC -g ruby -o .out-ruby/

You will now see messages logged about which files have been processed:

[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.rspec
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/spec_helper.rb
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/configuration_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb
[main] INFO o.o.c.languages.AbstractRubyCodegen - Successfully executed: /usr/local/bin/rubocopy -a /Users/jim/projects/openapi-generator/.out-ruby/spec/api_client_spec.rb
[main] INFO o.o.codegen.TemplateManager - Skipped /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/VERSION
[main] INFO o.o.codegen.TemplateManager - writing file /Users/jim/projects/openapi-generator/.out-ruby/.openapi-generator/FILES
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/fork-qna/index.html b/docs/fork-qna/index.html index 78b59db3493..a6d8f018aea 100644 --- a/docs/fork-qna/index.html +++ b/docs/fork-qna/index.html @@ -27,14 +27,14 @@
-

Swagger Codegen Fork: Q&A

This document aims to answer some questions about the fork for historical reference, where these questions don't fit into other documents related to the project itself.

Why was it decided to fork Swagger Codegen?

There are several reasons:

  1. The founding members felt that Swagger Codegen 3.0.0 was diverging too much from the philosophy of Swagger Codegen 2.x.
  2. The founding members were concerned that the maintenance overhead of two separate branches (2.x, 3.x) would result in issues similar to those felt in the Python community.
  3. The founding members wanted a more rapid release cycle (weekly patch release, monthly minor release) so users do not need to wait for several months to get a stable release.
  4. Having a community-driven version allows for innovation, reliability, and a roadmap owned by the community.

Are there any changes to the project license?

No, OpenAPI Generator is still using the Apache license (version 2).

I am currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator?

OpenAPI Generator is based on Swagger Codegen 2.4.0-SNAPSHOT version so the migration should be relatively straightforward. Refer to the migration guide for more information.

Who maintains this Q&A page?

This Q&A page is maintained by the core team members. It is not maintained by any single person, nor do these Q&As represent the views of any individual or person.

Last updated on by Oleh Kurpiak
+

Swagger Codegen Fork: Q&A

This document aims to answer some questions about the fork for historical reference, where these questions don't fit into other documents related to the project itself.

Why was it decided to fork Swagger Codegen?

There are several reasons:

  1. The founding members felt that Swagger Codegen 3.0.0 was diverging too much from the philosophy of Swagger Codegen 2.x.
  2. The founding members were concerned that the maintenance overhead of two separate branches (2.x, 3.x) would result in issues similar to those felt in the Python community.
  3. The founding members wanted a more rapid release cycle (weekly patch release, monthly minor release) so users do not need to wait for several months to get a stable release.
  4. Having a community-driven version allows for innovation, reliability, and a roadmap owned by the community.

Are there any changes to the project license?

No, OpenAPI Generator is still using the Apache license (version 2).

I am currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator?

OpenAPI Generator is based on Swagger Codegen 2.4.0-SNAPSHOT version so the migration should be relatively straightforward. Refer to the migration guide for more information.

Who maintains this Q&A page?

This Q&A page is maintained by the core team members. It is not maintained by any single person, nor do these Q&As represent the views of any individual or person.

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/README/index.html b/docs/generators/README/index.html index 64e3751fd9a..37f34742bec 100644 --- a/docs/generators/README/index.html +++ b/docs/generators/README/index.html @@ -27,14 +27,14 @@
-

README

The following generators are available:

CLIENT generators

SERVER generators

DOCUMENTATION generators

SCHEMA generators

CONFIG generators

Last updated on by Oleh Kurpiak
+

README

The following generators are available:

CLIENT generators

SERVER generators

DOCUMENTATION generators

SCHEMA generators

CONFIG generators

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/ada-server/index.html b/docs/generators/ada-server/index.html index 92acd07cff9..d137a042b6e 100644 --- a/docs/generators/ada-server/index.html +++ b/docs/generators/ada-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ada/index.html b/docs/generators/ada/index.html index 8410920d4d5..5bb8671ff30 100644 --- a/docs/generators/ada/index.html +++ b/docs/generators/ada/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/android/index.html b/docs/generators/android/index.html index 9ae5458e7bc..f4a110bd3fa 100644 --- a/docs/generators/android/index.html +++ b/docs/generators/android/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/apache2/index.html b/docs/generators/apache2/index.html index 03786edf52e..053ee4550ec 100644 --- a/docs/generators/apache2/index.html +++ b/docs/generators/apache2/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/apex/index.html b/docs/generators/apex/index.html index 53a5e5f5891..74bc0f8decf 100644 --- a/docs/generators/apex/index.html +++ b/docs/generators/apex/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/asciidoc/index.html b/docs/generators/asciidoc/index.html index 091a99084a1..914f2bf8147 100644 --- a/docs/generators/asciidoc/index.html +++ b/docs/generators/asciidoc/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/aspnetcore/index.html b/docs/generators/aspnetcore/index.html index 2a94515d8ef..505f1d1c9bc 100644 --- a/docs/generators/aspnetcore/index.html +++ b/docs/generators/aspnetcore/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/avro-schema/index.html b/docs/generators/avro-schema/index.html index 66f457c58e9..24d730e4cf8 100644 --- a/docs/generators/avro-schema/index.html +++ b/docs/generators/avro-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/bash/index.html b/docs/generators/bash/index.html index c9ea025093b..67ecb242a87 100644 --- a/docs/generators/bash/index.html +++ b/docs/generators/bash/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/c/index.html b/docs/generators/c/index.html index 6b22d17e413..a228139b21f 100644 --- a/docs/generators/c/index.html +++ b/docs/generators/c/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/clojure/index.html b/docs/generators/clojure/index.html index 3566a9f3410..5da7baae70d 100644 --- a/docs/generators/clojure/index.html +++ b/docs/generators/clojure/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-pistache-server/index.html b/docs/generators/cpp-pistache-server/index.html index b6269e43df9..5eb756f8f3d 100644 --- a/docs/generators/cpp-pistache-server/index.html +++ b/docs/generators/cpp-pistache-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-qt-client/index.html b/docs/generators/cpp-qt-client/index.html index f87c9b51e25..847feaa0d54 100644 --- a/docs/generators/cpp-qt-client/index.html +++ b/docs/generators/cpp-qt-client/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-qt-qhttpengine-server/index.html b/docs/generators/cpp-qt-qhttpengine-server/index.html index fee88a19393..236f6d89cef 100644 --- a/docs/generators/cpp-qt-qhttpengine-server/index.html +++ b/docs/generators/cpp-qt-qhttpengine-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-restbed-server/index.html b/docs/generators/cpp-restbed-server/index.html index 2efafe0bd39..c60d091400c 100644 --- a/docs/generators/cpp-restbed-server/index.html +++ b/docs/generators/cpp-restbed-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-restsdk/index.html b/docs/generators/cpp-restsdk/index.html index 66cc98e94e4..988ff540e20 100644 --- a/docs/generators/cpp-restsdk/index.html +++ b/docs/generators/cpp-restsdk/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-tiny/index.html b/docs/generators/cpp-tiny/index.html index 5f91a5eccf3..5688bcb3ba7 100644 --- a/docs/generators/cpp-tiny/index.html +++ b/docs/generators/cpp-tiny/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-tizen/index.html b/docs/generators/cpp-tizen/index.html index bf91a16006a..7bb41dd0d35 100644 --- a/docs/generators/cpp-tizen/index.html +++ b/docs/generators/cpp-tizen/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cpp-ue4/index.html b/docs/generators/cpp-ue4/index.html index 6e15d5e8a11..814929efda2 100644 --- a/docs/generators/cpp-ue4/index.html +++ b/docs/generators/cpp-ue4/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/crystal/index.html b/docs/generators/crystal/index.html index 8918b70b938..a3e5189b6ba 100644 --- a/docs/generators/crystal/index.html +++ b/docs/generators/crystal/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/csharp-dotnet2/index.html b/docs/generators/csharp-dotnet2/index.html index a4268c27f2d..d2a09deec9b 100644 --- a/docs/generators/csharp-dotnet2/index.html +++ b/docs/generators/csharp-dotnet2/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/csharp-netcore-functions/index.html b/docs/generators/csharp-netcore-functions/index.html index ee904748524..3064c47c7ac 100644 --- a/docs/generators/csharp-netcore-functions/index.html +++ b/docs/generators/csharp-netcore-functions/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/csharp-netcore/index.html b/docs/generators/csharp-netcore/index.html index a13232ffae7..4cdf5fd160b 100644 --- a/docs/generators/csharp-netcore/index.html +++ b/docs/generators/csharp-netcore/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/csharp/index.html b/docs/generators/csharp/index.html index 62700d96559..0200e841259 100644 --- a/docs/generators/csharp/index.html +++ b/docs/generators/csharp/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/cwiki/index.html b/docs/generators/cwiki/index.html index 19144e43ce8..7da8ac951c7 100644 --- a/docs/generators/cwiki/index.html +++ b/docs/generators/cwiki/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/dart-dio-next/index.html b/docs/generators/dart-dio-next/index.html index f1409fb4acc..85158433b1c 100644 --- a/docs/generators/dart-dio-next/index.html +++ b/docs/generators/dart-dio-next/index.html @@ -27,14 +27,14 @@
-

Documentation for the dart-dio-next Generator

METADATA

PropertyValueNotes
generator namedart-dio-nextpass this to the generate command after -g
generator stabilityEXPERIMENTAL
generator typeCLIENT
generator languageDart
generator default templating enginemustache
helpTxtGenerates a Dart Dio client library with null-safety.

CONFIG OPTIONS

These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
dateLibrarySpecify Date library
core
[DEFAULT] Dart core library (DateTime)
timemachine
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
core
disallowAdditionalPropertiesIfNotPresentIf false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
true
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
enumUnknownDefaultCaseIf the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.
false
No changes to the enum's are made, this is the default option.
true
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
false
legacyDiscriminatorBehaviorSet to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).
true
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
false
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
true
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
pubAuthorAuthor name in generated pubspecAuthor
pubAuthorEmailEmail address of the author in generated pubspecauthor@homepage
pubDescriptionDescription in generated pubspecOpenAPI API client
pubHomepageHomepage in generated pubspechomepage
pubLibraryLibrary name in generated codeopenapi.api
pubNameName in generated pubspecopenapi
pubVersionVersion in generated pubspec1.0.0
serializationLibrarySpecify serialization library
built_value
[DEFAULT] built_value
built_value
sortModelPropertiesByRequiredFlagSort model properties to place required parameters before optional parameters.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
sourceFoldersource folder for generated codesrc
useEnumExtensionAllow the 'x-enum-values' extension for enumsfalse

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • String
  • bool
  • double
  • int
  • num

RESERVED WORDS

  • abstract
  • as
  • assert
  • async
  • await
  • break
  • case
  • catch
  • class
  • const
  • continue
  • covariant
  • default
  • deferred
  • do
  • dynamic
  • else
  • enum
  • export
  • extends
  • extension
  • external
  • factory
  • false
  • final
  • finally
  • for
  • function
  • get
  • hide
  • if
  • implements
  • import
  • in
  • inout
  • interface
  • is
  • late
  • library
  • mixin
  • native
  • new
  • null
  • of
  • on
  • operator
  • out
  • part
  • patch
  • required
  • rethrow
  • return
  • set
  • show
  • source
  • static
  • super
  • switch
  • sync
  • this
  • throw
  • true
  • try
  • typedef
  • var
  • void
  • while
  • with
  • yield

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
Uuid
ArrayOAS2,OAS3
NullOAS3
AnyTypeOAS2,OAS3
ObjectOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3
allOfOAS2,OAS3
anyOfOAS3
oneOfOAS3
notOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by Justin Black
+

Documentation for the dart-dio-next Generator

METADATA

PropertyValueNotes
generator namedart-dio-nextpass this to the generate command after -g
generator stabilityEXPERIMENTAL
generator typeCLIENT
generator languageDart
generator default templating enginemustache
helpTxtGenerates a Dart Dio client library with null-safety.

CONFIG OPTIONS

These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
dateLibrarySpecify Date library
core
[DEFAULT] Dart core library (DateTime)
timemachine
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
core
disallowAdditionalPropertiesIfNotPresentIf false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
true
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
enumUnknownDefaultCaseIf the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.
false
No changes to the enum's are made, this is the default option.
true
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
false
finalPropertiesWhether properties are marked as final when using Json Serializable for serializationtrue
legacyDiscriminatorBehaviorSet to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).
true
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
false
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
true
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
pubAuthorAuthor name in generated pubspecAuthor
pubAuthorEmailEmail address of the author in generated pubspecauthor@homepage
pubDescriptionDescription in generated pubspecOpenAPI API client
pubHomepageHomepage in generated pubspechomepage
pubLibraryLibrary name in generated codeopenapi.api
pubNameName in generated pubspecopenapi
pubVersionVersion in generated pubspec1.0.0
serializationLibrarySpecify serialization library
built_value
[DEFAULT] built_value
json_serializable
[BETA] json_serializable
built_value
sortModelPropertiesByRequiredFlagSort model properties to place required parameters before optional parameters.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
sourceFoldersource folder for generated codesrc
useEnumExtensionAllow the 'x-enum-values' extension for enumsfalse

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • String
  • bool
  • double
  • int
  • num

RESERVED WORDS

  • abstract
  • as
  • assert
  • async
  • await
  • break
  • case
  • catch
  • class
  • const
  • continue
  • covariant
  • default
  • deferred
  • do
  • dynamic
  • else
  • enum
  • export
  • extends
  • extension
  • external
  • factory
  • false
  • final
  • finally
  • for
  • function
  • get
  • hide
  • if
  • implements
  • import
  • in
  • inout
  • interface
  • is
  • late
  • library
  • mixin
  • native
  • new
  • null
  • of
  • on
  • operator
  • out
  • part
  • patch
  • required
  • rethrow
  • return
  • set
  • show
  • source
  • static
  • super
  • switch
  • sync
  • this
  • throw
  • true
  • try
  • typedef
  • var
  • void
  • while
  • with
  • yield

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
Uuid
ArrayOAS2,OAS3
NullOAS3
AnyTypeOAS2,OAS3
ObjectOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3
allOfOAS2,OAS3
anyOfOAS3
oneOfOAS3
notOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by Michael Marner
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/dart/index.html b/docs/generators/dart/index.html index 108fd9ae5be..ff7f694d0cb 100644 --- a/docs/generators/dart/index.html +++ b/docs/generators/dart/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/dynamic-html/index.html b/docs/generators/dynamic-html/index.html index c162c790656..ed9dc258aaa 100644 --- a/docs/generators/dynamic-html/index.html +++ b/docs/generators/dynamic-html/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/eiffel/index.html b/docs/generators/eiffel/index.html index 00c66962751..d7dfa584551 100644 --- a/docs/generators/eiffel/index.html +++ b/docs/generators/eiffel/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/elixir/index.html b/docs/generators/elixir/index.html index fbd311379cc..34803720b4c 100644 --- a/docs/generators/elixir/index.html +++ b/docs/generators/elixir/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/elm/index.html b/docs/generators/elm/index.html index 8fbe051c02a..9f56b0ef0aa 100644 --- a/docs/generators/elm/index.html +++ b/docs/generators/elm/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/erlang-client/index.html b/docs/generators/erlang-client/index.html index 661dc4609d4..ed599bbefe5 100644 --- a/docs/generators/erlang-client/index.html +++ b/docs/generators/erlang-client/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/erlang-proper/index.html b/docs/generators/erlang-proper/index.html index 3ad601f69ed..eb77cd73bf0 100644 --- a/docs/generators/erlang-proper/index.html +++ b/docs/generators/erlang-proper/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/erlang-server/index.html b/docs/generators/erlang-server/index.html index 5adca920862..80366abc5a5 100644 --- a/docs/generators/erlang-server/index.html +++ b/docs/generators/erlang-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/fsharp-functions/index.html b/docs/generators/fsharp-functions/index.html index a7a1e9fd0f6..f129df5f832 100644 --- a/docs/generators/fsharp-functions/index.html +++ b/docs/generators/fsharp-functions/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/fsharp-giraffe-server/index.html b/docs/generators/fsharp-giraffe-server/index.html index bccfb9f6b5d..9292957ea45 100644 --- a/docs/generators/fsharp-giraffe-server/index.html +++ b/docs/generators/fsharp-giraffe-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/go-echo-server/index.html b/docs/generators/go-echo-server/index.html index 9fe999a142b..6223c7ebcea 100644 --- a/docs/generators/go-echo-server/index.html +++ b/docs/generators/go-echo-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/go-experimental/index.html b/docs/generators/go-experimental/index.html index 855fa676695..7fe7bd926af 100644 --- a/docs/generators/go-experimental/index.html +++ b/docs/generators/go-experimental/index.html @@ -27,14 +27,14 @@
-

Config Options for go-experimental

OptionDescriptionValuesDefault
disallowAdditionalPropertiesIfNotPresentSpecify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
true
enumClassPrefixPrefix enum with class namefalse
generateInterfacesGenerate interfaces for api classesfalse
hideGenerationTimestampHides the generation timestamp when files are generated.true
isGoSubmodulewhether the generated Go module is a submodulefalse
packageNameGo package name (convention: lowercase).openapi
packageVersionGo package version.1.0.0
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
structPrefixwhether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOptsfalse
useOneOfDiscriminatorLookupUse the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.false
skipReadonlyPropertiesInIntSkip default values to the readOnly properties in the model init function./ /false/
withAWSV4Signaturewhether to include AWS v4 signature supportfalse
withGoCodegenCommentwhether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffsfalse
withXmlwhether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)false

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • bool
  • byte
  • complex128
  • complex64
  • float32
  • float64
  • int
  • int32
  • int64
  • interface
  • map[string]interface
  • rune
  • string
  • uint
  • uint32
  • uint64

RESERVED WORDS

  • bool
  • break
  • byte
  • case
  • chan
  • complex128
  • complex64
  • const
  • continue
  • default
  • defer
  • else
  • error
  • fallthrough
  • float32
  • float64
  • for
  • func
  • go
  • goto
  • if
  • import
  • int
  • int16
  • int32
  • int64
  • int8
  • interface
  • map
  • nil
  • package
  • range
  • return
  • rune
  • select
  • string
  • struct
  • switch
  • type
  • uint
  • uint16
  • uint32
  • uint64
  • uint8
  • uintptr
  • var

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
ArrayOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by Oleh Kurpiak
+

Config Options for go-experimental

OptionDescriptionValuesDefault
disallowAdditionalPropertiesIfNotPresentSpecify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
true
enumClassPrefixPrefix enum with class namefalse
generateInterfacesGenerate interfaces for api classesfalse
hideGenerationTimestampHides the generation timestamp when files are generated.true
isGoSubmodulewhether the generated Go module is a submodulefalse
packageNameGo package name (convention: lowercase).openapi
packageVersionGo package version.1.0.0
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
structPrefixwhether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOptsfalse
useOneOfDiscriminatorLookupUse the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.false
skipReadonlyPropertiesInIntSkip default values to the readOnly properties in the model init function./ /false/
withAWSV4Signaturewhether to include AWS v4 signature supportfalse
withGoCodegenCommentwhether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffsfalse
withXmlwhether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)false

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • bool
  • byte
  • complex128
  • complex64
  • float32
  • float64
  • int
  • int32
  • int64
  • interface
  • map[string]interface
  • rune
  • string
  • uint
  • uint32
  • uint64

RESERVED WORDS

  • bool
  • break
  • byte
  • case
  • chan
  • complex128
  • complex64
  • const
  • continue
  • default
  • defer
  • else
  • error
  • fallthrough
  • float32
  • float64
  • for
  • func
  • go
  • goto
  • if
  • import
  • int
  • int16
  • int32
  • int64
  • int8
  • interface
  • map
  • nil
  • package
  • range
  • return
  • rune
  • select
  • string
  • struct
  • switch
  • type
  • uint
  • uint16
  • uint32
  • uint64
  • uint8
  • uintptr
  • var

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
ArrayOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/go-gin-server/index.html b/docs/generators/go-gin-server/index.html index e06cc0f00e3..fd25383761c 100644 --- a/docs/generators/go-gin-server/index.html +++ b/docs/generators/go-gin-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/go-server/index.html b/docs/generators/go-server/index.html index dfe719b56b4..d2bd9c8894d 100644 --- a/docs/generators/go-server/index.html +++ b/docs/generators/go-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/go/index.html b/docs/generators/go/index.html index ae5d4ab7cd7..cd22545e3aa 100644 --- a/docs/generators/go/index.html +++ b/docs/generators/go/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/graphql-nodejs-express-server/index.html b/docs/generators/graphql-nodejs-express-server/index.html index fd541fdf889..447706a02af 100644 --- a/docs/generators/graphql-nodejs-express-server/index.html +++ b/docs/generators/graphql-nodejs-express-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/graphql-schema/index.html b/docs/generators/graphql-schema/index.html index ede83d9257a..ed2ba7a28d2 100644 --- a/docs/generators/graphql-schema/index.html +++ b/docs/generators/graphql-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/groovy/index.html b/docs/generators/groovy/index.html index ba1426f6065..f65e13e2484 100644 --- a/docs/generators/groovy/index.html +++ b/docs/generators/groovy/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/haskell-http-client/index.html b/docs/generators/haskell-http-client/index.html index 667b2008236..8e33cab1cee 100644 --- a/docs/generators/haskell-http-client/index.html +++ b/docs/generators/haskell-http-client/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/haskell-yesod/index.html b/docs/generators/haskell-yesod/index.html index d0c5e39f7a0..4ecc9f81af9 100644 --- a/docs/generators/haskell-yesod/index.html +++ b/docs/generators/haskell-yesod/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/haskell/index.html b/docs/generators/haskell/index.html index d7971098623..5cd2baa1e3e 100644 --- a/docs/generators/haskell/index.html +++ b/docs/generators/haskell/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/html/index.html b/docs/generators/html/index.html index f2dc2919d4f..65e20ad74df 100644 --- a/docs/generators/html/index.html +++ b/docs/generators/html/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/html2/index.html b/docs/generators/html2/index.html index 8201c52711f..541fb138a99 100644 --- a/docs/generators/html2/index.html +++ b/docs/generators/html2/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/index.html b/docs/generators/index.html index 475249d1cab..d788f2a3166 100644 --- a/docs/generators/index.html +++ b/docs/generators/index.html @@ -27,14 +27,14 @@
-

Generators List

The following generators are available:

CLIENT generators

SERVER generators

DOCUMENTATION generators

SCHEMA generators

CONFIG generators

Last updated on by Oleh Kurpiak
+

Generators List

The following generators are available:

CLIENT generators

SERVER generators

DOCUMENTATION generators

SCHEMA generators

CONFIG generators

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/java-camel/index.html b/docs/generators/java-camel/index.html index 757215d51cd..b890d80b06e 100644 --- a/docs/generators/java-camel/index.html +++ b/docs/generators/java-camel/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-inflector/index.html b/docs/generators/java-inflector/index.html index 92331afa165..64c5a7cc9e6 100644 --- a/docs/generators/java-inflector/index.html +++ b/docs/generators/java-inflector/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-micronaut-client/index.html b/docs/generators/java-micronaut-client/index.html index 47b2748233c..ec532fc600e 100644 --- a/docs/generators/java-micronaut-client/index.html +++ b/docs/generators/java-micronaut-client/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-micronaut-server/index.html b/docs/generators/java-micronaut-server/index.html index e9b4d92636e..18dc683f37b 100644 --- a/docs/generators/java-micronaut-server/index.html +++ b/docs/generators/java-micronaut-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-msf4j/index.html b/docs/generators/java-msf4j/index.html index 86fbc909972..9c47b1ed7a3 100644 --- a/docs/generators/java-msf4j/index.html +++ b/docs/generators/java-msf4j/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-pkmst/index.html b/docs/generators/java-pkmst/index.html index baa01bc7a58..3bf6b61e5bf 100644 --- a/docs/generators/java-pkmst/index.html +++ b/docs/generators/java-pkmst/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-play-framework/index.html b/docs/generators/java-play-framework/index.html index 4f8c3711cef..00bca18e186 100644 --- a/docs/generators/java-play-framework/index.html +++ b/docs/generators/java-play-framework/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-undertow-server/index.html b/docs/generators/java-undertow-server/index.html index 9156be2f680..a78679dac13 100644 --- a/docs/generators/java-undertow-server/index.html +++ b/docs/generators/java-undertow-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-vertx-web/index.html b/docs/generators/java-vertx-web/index.html index d037d471f2f..e8f57110cce 100644 --- a/docs/generators/java-vertx-web/index.html +++ b/docs/generators/java-vertx-web/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java-vertx/index.html b/docs/generators/java-vertx/index.html index a4588ae87b1..9e59c54110c 100644 --- a/docs/generators/java-vertx/index.html +++ b/docs/generators/java-vertx/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/java/index.html b/docs/generators/java/index.html index 14e3fece3de..de485e5d796 100644 --- a/docs/generators/java/index.html +++ b/docs/generators/java/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/javascript-apollo/index.html b/docs/generators/javascript-apollo/index.html index 6db2ce6c550..608cd74ffa5 100644 --- a/docs/generators/javascript-apollo/index.html +++ b/docs/generators/javascript-apollo/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/javascript-closure-angular/index.html b/docs/generators/javascript-closure-angular/index.html index eebce7d44ad..6be907edcda 100644 --- a/docs/generators/javascript-closure-angular/index.html +++ b/docs/generators/javascript-closure-angular/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/javascript-flowtyped/index.html b/docs/generators/javascript-flowtyped/index.html index 32a1dd72bd0..ab926c1937e 100644 --- a/docs/generators/javascript-flowtyped/index.html +++ b/docs/generators/javascript-flowtyped/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/javascript/index.html b/docs/generators/javascript/index.html index 886b91347bd..14da1d66413 100644 --- a/docs/generators/javascript/index.html +++ b/docs/generators/javascript/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-cxf-cdi/index.html b/docs/generators/jaxrs-cxf-cdi/index.html index 859e162388b..9c872bc0776 100644 --- a/docs/generators/jaxrs-cxf-cdi/index.html +++ b/docs/generators/jaxrs-cxf-cdi/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-cxf-client/index.html b/docs/generators/jaxrs-cxf-client/index.html index 4083e786e26..669e81ed65d 100644 --- a/docs/generators/jaxrs-cxf-client/index.html +++ b/docs/generators/jaxrs-cxf-client/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-cxf-extended/index.html b/docs/generators/jaxrs-cxf-extended/index.html index 9b2239aef95..36a684fb7f6 100644 --- a/docs/generators/jaxrs-cxf-extended/index.html +++ b/docs/generators/jaxrs-cxf-extended/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-cxf/index.html b/docs/generators/jaxrs-cxf/index.html index 750ac408ce9..bdd54a64d9b 100644 --- a/docs/generators/jaxrs-cxf/index.html +++ b/docs/generators/jaxrs-cxf/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-jersey/index.html b/docs/generators/jaxrs-jersey/index.html index fd6a573cfbc..9925e743413 100644 --- a/docs/generators/jaxrs-jersey/index.html +++ b/docs/generators/jaxrs-jersey/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-resteasy-eap/index.html b/docs/generators/jaxrs-resteasy-eap/index.html index be46bd2637a..d5e123dd9af 100644 --- a/docs/generators/jaxrs-resteasy-eap/index.html +++ b/docs/generators/jaxrs-resteasy-eap/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-resteasy/index.html b/docs/generators/jaxrs-resteasy/index.html index a7147c6c1ac..659f193e00a 100644 --- a/docs/generators/jaxrs-resteasy/index.html +++ b/docs/generators/jaxrs-resteasy/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jaxrs-spec/index.html b/docs/generators/jaxrs-spec/index.html index f480c5cb5e0..3a387d72da9 100644 --- a/docs/generators/jaxrs-spec/index.html +++ b/docs/generators/jaxrs-spec/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/jmeter/index.html b/docs/generators/jmeter/index.html index a1a209da0d6..8b0c3a5d4bc 100644 --- a/docs/generators/jmeter/index.html +++ b/docs/generators/jmeter/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/k6/index.html b/docs/generators/k6/index.html index 5d08b7e18ec..f3d7ae3ecd3 100644 --- a/docs/generators/k6/index.html +++ b/docs/generators/k6/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/kotlin-server/index.html b/docs/generators/kotlin-server/index.html index cbcf38db496..761db45bdad 100644 --- a/docs/generators/kotlin-server/index.html +++ b/docs/generators/kotlin-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/kotlin-spring/index.html b/docs/generators/kotlin-spring/index.html index 07ed6bb150c..a3bb19f4a7e 100644 --- a/docs/generators/kotlin-spring/index.html +++ b/docs/generators/kotlin-spring/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/kotlin-vertx/index.html b/docs/generators/kotlin-vertx/index.html index 639975290ee..1887546ed9a 100644 --- a/docs/generators/kotlin-vertx/index.html +++ b/docs/generators/kotlin-vertx/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/kotlin/index.html b/docs/generators/kotlin/index.html index 6dd68b1aca5..9a23ff607f3 100644 --- a/docs/generators/kotlin/index.html +++ b/docs/generators/kotlin/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ktorm-schema/index.html b/docs/generators/ktorm-schema/index.html index 18d4f91168b..b910da81fe0 100644 --- a/docs/generators/ktorm-schema/index.html +++ b/docs/generators/ktorm-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/lua/index.html b/docs/generators/lua/index.html index e4e2f6e671f..91277a4d400 100644 --- a/docs/generators/lua/index.html +++ b/docs/generators/lua/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/markdown/index.html b/docs/generators/markdown/index.html index 18d45fe1e31..807a99a5c14 100644 --- a/docs/generators/markdown/index.html +++ b/docs/generators/markdown/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/mysql-schema/index.html b/docs/generators/mysql-schema/index.html index 80f371d3a1d..4fb697e1a45 100644 --- a/docs/generators/mysql-schema/index.html +++ b/docs/generators/mysql-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/nim/index.html b/docs/generators/nim/index.html index 8d937bc9e0c..990bc4f468e 100644 --- a/docs/generators/nim/index.html +++ b/docs/generators/nim/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/nodejs-express-server/index.html b/docs/generators/nodejs-express-server/index.html index f2a9b0b08ac..c9fb42913c0 100644 --- a/docs/generators/nodejs-express-server/index.html +++ b/docs/generators/nodejs-express-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/objc/index.html b/docs/generators/objc/index.html index 4179cae3686..e7e50f31e56 100644 --- a/docs/generators/objc/index.html +++ b/docs/generators/objc/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ocaml/index.html b/docs/generators/ocaml/index.html index 58e81d90f27..b2aa95de7ec 100644 --- a/docs/generators/ocaml/index.html +++ b/docs/generators/ocaml/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/openapi-yaml/index.html b/docs/generators/openapi-yaml/index.html index 30c68db217c..60d98f981be 100644 --- a/docs/generators/openapi-yaml/index.html +++ b/docs/generators/openapi-yaml/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/openapi/index.html b/docs/generators/openapi/index.html index 9d97f310623..615c733a14e 100644 --- a/docs/generators/openapi/index.html +++ b/docs/generators/openapi/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/perl/index.html b/docs/generators/perl/index.html index 85872bbb0f4..9a7e2af4128 100644 --- a/docs/generators/perl/index.html +++ b/docs/generators/perl/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-dt/index.html b/docs/generators/php-dt/index.html index 914844e5656..f59cf97a492 100644 --- a/docs/generators/php-dt/index.html +++ b/docs/generators/php-dt/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-laravel/index.html b/docs/generators/php-laravel/index.html index 67f61b3c6fd..4d37e9e92a5 100644 --- a/docs/generators/php-laravel/index.html +++ b/docs/generators/php-laravel/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-lumen/index.html b/docs/generators/php-lumen/index.html index 04884c47d20..64f89dd37b0 100644 --- a/docs/generators/php-lumen/index.html +++ b/docs/generators/php-lumen/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-mezzio-ph/index.html b/docs/generators/php-mezzio-ph/index.html index e4e6d19469d..6d2d1f779c1 100644 --- a/docs/generators/php-mezzio-ph/index.html +++ b/docs/generators/php-mezzio-ph/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-slim-deprecated/index.html b/docs/generators/php-slim-deprecated/index.html index d16aa4d34d5..8fa6ccfc20d 100644 --- a/docs/generators/php-slim-deprecated/index.html +++ b/docs/generators/php-slim-deprecated/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-slim4/index.html b/docs/generators/php-slim4/index.html index 133b69e7952..2aa7f6ef91a 100644 --- a/docs/generators/php-slim4/index.html +++ b/docs/generators/php-slim4/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php-symfony/index.html b/docs/generators/php-symfony/index.html index b34ffec80f2..7657e4601b9 100644 --- a/docs/generators/php-symfony/index.html +++ b/docs/generators/php-symfony/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/php/index.html b/docs/generators/php/index.html index b28a0e9b820..3fc63c4f67a 100644 --- a/docs/generators/php/index.html +++ b/docs/generators/php/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/plantuml/index.html b/docs/generators/plantuml/index.html index 84501398600..56a7eb3ff7a 100644 --- a/docs/generators/plantuml/index.html +++ b/docs/generators/plantuml/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/powershell/index.html b/docs/generators/powershell/index.html index eecba0166af..9a409ea893d 100644 --- a/docs/generators/powershell/index.html +++ b/docs/generators/powershell/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/protobuf-schema/index.html b/docs/generators/protobuf-schema/index.html index 8b98bc3bbe6..a73d5202f5d 100644 --- a/docs/generators/protobuf-schema/index.html +++ b/docs/generators/protobuf-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-aiohttp/index.html b/docs/generators/python-aiohttp/index.html index 50b152f21b5..e34f42c53e6 100644 --- a/docs/generators/python-aiohttp/index.html +++ b/docs/generators/python-aiohttp/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-blueplanet/index.html b/docs/generators/python-blueplanet/index.html index bc790f8f7d5..2b2d8b80ab8 100644 --- a/docs/generators/python-blueplanet/index.html +++ b/docs/generators/python-blueplanet/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-experimental/index.html b/docs/generators/python-experimental/index.html index b47d6d4fcab..068502600e1 100644 --- a/docs/generators/python-experimental/index.html +++ b/docs/generators/python-experimental/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-fastapi/index.html b/docs/generators/python-fastapi/index.html index e771fedd50d..5b22ac81d48 100644 --- a/docs/generators/python-fastapi/index.html +++ b/docs/generators/python-fastapi/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-flask/index.html b/docs/generators/python-flask/index.html index d9b3490e718..89364ad94d2 100644 --- a/docs/generators/python-flask/index.html +++ b/docs/generators/python-flask/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python-legacy/index.html b/docs/generators/python-legacy/index.html index 7fff71f9fc8..d5ea2c79a45 100644 --- a/docs/generators/python-legacy/index.html +++ b/docs/generators/python-legacy/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/python/index.html b/docs/generators/python/index.html index 87852dbb4e1..dc3b14958f2 100644 --- a/docs/generators/python/index.html +++ b/docs/generators/python/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/r/index.html b/docs/generators/r/index.html index f439f17f98e..c3d5fa3201d 100644 --- a/docs/generators/r/index.html +++ b/docs/generators/r/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ruby-on-rails/index.html b/docs/generators/ruby-on-rails/index.html index 149893d74e7..c7a840e47c8 100644 --- a/docs/generators/ruby-on-rails/index.html +++ b/docs/generators/ruby-on-rails/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ruby-sinatra/index.html b/docs/generators/ruby-sinatra/index.html index 87fc19a29b5..7f659a575e2 100644 --- a/docs/generators/ruby-sinatra/index.html +++ b/docs/generators/ruby-sinatra/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/ruby/index.html b/docs/generators/ruby/index.html index bbe1527a3e5..6e810b82945 100644 --- a/docs/generators/ruby/index.html +++ b/docs/generators/ruby/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/rust-server/index.html b/docs/generators/rust-server/index.html index af4657ffb65..ec079a7e8a2 100644 --- a/docs/generators/rust-server/index.html +++ b/docs/generators/rust-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/rust/index.html b/docs/generators/rust/index.html index d281716de7b..95903660718 100644 --- a/docs/generators/rust/index.html +++ b/docs/generators/rust/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-akka-http-server/index.html b/docs/generators/scala-akka-http-server/index.html index b2aa285d14b..bdcda604441 100644 --- a/docs/generators/scala-akka-http-server/index.html +++ b/docs/generators/scala-akka-http-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-akka/index.html b/docs/generators/scala-akka/index.html index 720174a4253..3b5432ef5ff 100644 --- a/docs/generators/scala-akka/index.html +++ b/docs/generators/scala-akka/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-finch/index.html b/docs/generators/scala-finch/index.html index bb1639021fe..e5220d61535 100644 --- a/docs/generators/scala-finch/index.html +++ b/docs/generators/scala-finch/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-gatling/index.html b/docs/generators/scala-gatling/index.html index 55a18c3af6b..cf7a9a5195b 100644 --- a/docs/generators/scala-gatling/index.html +++ b/docs/generators/scala-gatling/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-httpclient-deprecated/index.html b/docs/generators/scala-httpclient-deprecated/index.html index a18b4d8813a..3aa7cf337c6 100644 --- a/docs/generators/scala-httpclient-deprecated/index.html +++ b/docs/generators/scala-httpclient-deprecated/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-lagom-server/index.html b/docs/generators/scala-lagom-server/index.html index 9e1ed1ab5f8..0d4c7bf73f4 100644 --- a/docs/generators/scala-lagom-server/index.html +++ b/docs/generators/scala-lagom-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-play-server/index.html b/docs/generators/scala-play-server/index.html index 20d98f7d7b6..cfa3a08267e 100644 --- a/docs/generators/scala-play-server/index.html +++ b/docs/generators/scala-play-server/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scala-sttp/index.html b/docs/generators/scala-sttp/index.html index 3cd1e7de8b4..dae9eedcf28 100644 --- a/docs/generators/scala-sttp/index.html +++ b/docs/generators/scala-sttp/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scalatra/index.html b/docs/generators/scalatra/index.html index c3b431fd7b3..97a85acd9fa 100644 --- a/docs/generators/scalatra/index.html +++ b/docs/generators/scalatra/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/scalaz/index.html b/docs/generators/scalaz/index.html index d1381454141..33b838d1a05 100644 --- a/docs/generators/scalaz/index.html +++ b/docs/generators/scalaz/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/spring/index.html b/docs/generators/spring/index.html index 7b40577020f..20e07c629d1 100644 --- a/docs/generators/spring/index.html +++ b/docs/generators/spring/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/swift5/index.html b/docs/generators/swift5/index.html index 9db9684278f..99f924df8a7 100644 --- a/docs/generators/swift5/index.html +++ b/docs/generators/swift5/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/tiny-cpp/index.html b/docs/generators/tiny-cpp/index.html index 5738b1a5411..971118ec770 100644 --- a/docs/generators/tiny-cpp/index.html +++ b/docs/generators/tiny-cpp/index.html @@ -27,14 +27,14 @@
-

Config Options for tiny-cpp

These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
controllername of microcontroller (e.g esp32 or esp8266)esp32
disallowAdditionalPropertiesIfNotPresentIf false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
true
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
legacyDiscriminatorBehaviorSet to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).
true
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
false
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
true
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
reservedWordPrefixPrefix to prepend to reserved words in order to avoid conflictsr_
sortModelPropertiesByRequiredFlagSort model properties to place required parameters before optional parameters.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
variableNameFirstCharacterUppercaseMake first character of variable name uppercase (eg. value -> Value)true

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • bool
  • double
  • float
  • int
  • long
  • std::string

RESERVED WORDS

  • alignas
  • alignof
  • and
  • and_eq
  • asm
  • auto
  • bitand
  • bitor
  • bool
  • break
  • case
  • catch
  • char
  • char16_t
  • char32_t
  • class
  • compl
  • concept
  • const
  • const_cast
  • constexpr
  • continue
  • decltype
  • default
  • delete
  • do
  • double
  • dynamic_cast
  • else
  • enum
  • explicit
  • export
  • extern
  • false
  • float
  • for
  • friend
  • goto
  • if
  • inline
  • int
  • linux
  • long
  • mutable
  • namespace
  • new
  • noexcept
  • not
  • not_eq
  • nullptr
  • operator
  • or
  • or_eq
  • private
  • protected
  • public
  • register
  • reinterpret_cast
  • requires
  • return
  • short
  • signed
  • sizeof
  • static
  • static_assert
  • static_cast
  • struct
  • switch
  • template
  • this
  • thread_local
  • throw
  • true
  • try
  • typedef
  • typeid
  • typename
  • union
  • unsigned
  • using
  • virtual
  • void
  • volatile
  • wchar_t
  • while
  • xor
  • xor_eq

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
ArrayOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by Oleh Kurpiak
+

Config Options for tiny-cpp

These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
controllername of microcontroller (e.g esp32 or esp8266)esp32
disallowAdditionalPropertiesIfNotPresentIf false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
false
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
true
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
true
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
legacyDiscriminatorBehaviorSet to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).
true
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
false
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
true
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
reservedWordPrefixPrefix to prepend to reserved words in order to avoid conflictsr_
sortModelPropertiesByRequiredFlagSort model properties to place required parameters before optional parameters.true
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
variableNameFirstCharacterUppercaseMake first character of variable name uppercase (eg. value -> Value)true

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By

LANGUAGE PRIMITIVES

  • bool
  • double
  • float
  • int
  • long
  • std::string

RESERVED WORDS

  • alignas
  • alignof
  • and
  • and_eq
  • asm
  • auto
  • bitand
  • bitor
  • bool
  • break
  • case
  • catch
  • char
  • char16_t
  • char32_t
  • class
  • compl
  • concept
  • const
  • const_cast
  • constexpr
  • continue
  • decltype
  • default
  • delete
  • do
  • double
  • dynamic_cast
  • else
  • enum
  • explicit
  • export
  • extern
  • false
  • float
  • for
  • friend
  • goto
  • if
  • inline
  • int
  • linux
  • long
  • mutable
  • namespace
  • new
  • noexcept
  • not
  • not_eq
  • nullptr
  • operator
  • or
  • or_eq
  • private
  • protected
  • public
  • register
  • reinterpret_cast
  • requires
  • return
  • short
  • signed
  • sizeof
  • static
  • static_assert
  • static_cast
  • struct
  • switch
  • template
  • this
  • thread_local
  • throw
  • true
  • try
  • typedef
  • typeid
  • typename
  • union
  • unsigned
  • using
  • virtual
  • void
  • volatile
  • wchar_t
  • while
  • xor
  • xor_eq

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
ArrayOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/generators/typescript-angular/index.html b/docs/generators/typescript-angular/index.html index 3fc83cfa869..18db124cbb5 100644 --- a/docs/generators/typescript-angular/index.html +++ b/docs/generators/typescript-angular/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-aurelia/index.html b/docs/generators/typescript-aurelia/index.html index b47ccf7a0b6..bcbdba2c946 100644 --- a/docs/generators/typescript-aurelia/index.html +++ b/docs/generators/typescript-aurelia/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-axios/index.html b/docs/generators/typescript-axios/index.html index 86feb889444..809254782c6 100644 --- a/docs/generators/typescript-axios/index.html +++ b/docs/generators/typescript-axios/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-fetch/index.html b/docs/generators/typescript-fetch/index.html index d1982f50ad5..d3ad9f1c08f 100644 --- a/docs/generators/typescript-fetch/index.html +++ b/docs/generators/typescript-fetch/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-inversify/index.html b/docs/generators/typescript-inversify/index.html index 0a11a8166a1..2ff269311df 100644 --- a/docs/generators/typescript-inversify/index.html +++ b/docs/generators/typescript-inversify/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-jquery/index.html b/docs/generators/typescript-jquery/index.html index cef664c0b58..e4017fb6e04 100644 --- a/docs/generators/typescript-jquery/index.html +++ b/docs/generators/typescript-jquery/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-nestjs/index.html b/docs/generators/typescript-nestjs/index.html index c1ad1c70ef4..f08cabd91e5 100644 --- a/docs/generators/typescript-nestjs/index.html +++ b/docs/generators/typescript-nestjs/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-node/index.html b/docs/generators/typescript-node/index.html index 1e530fe5d0c..f39853a7953 100644 --- a/docs/generators/typescript-node/index.html +++ b/docs/generators/typescript-node/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-redux-query/index.html b/docs/generators/typescript-redux-query/index.html index cec4489a40b..8409e851af6 100644 --- a/docs/generators/typescript-redux-query/index.html +++ b/docs/generators/typescript-redux-query/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript-rxjs/index.html b/docs/generators/typescript-rxjs/index.html index a2f806a3da1..8059da91ee7 100644 --- a/docs/generators/typescript-rxjs/index.html +++ b/docs/generators/typescript-rxjs/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/typescript/index.html b/docs/generators/typescript/index.html index 093c2b2b1e6..a222349d88a 100644 --- a/docs/generators/typescript/index.html +++ b/docs/generators/typescript/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/generators/wsdl-schema/index.html b/docs/generators/wsdl-schema/index.html index 8438591dfc1..623b976d8fd 100644 --- a/docs/generators/wsdl-schema/index.html +++ b/docs/generators/wsdl-schema/index.html @@ -32,9 +32,9 @@ - + - + diff --git a/docs/globals/index.html b/docs/globals/index.html index a5d0b93260d..8a91003e730 100644 --- a/docs/globals/index.html +++ b/docs/globals/index.html @@ -27,14 +27,14 @@
-

Global Properties

Available Global Properties

PropertyDescriptionAcceptable value
debugOpenAPIDumps JSON formatted and fully parsed OpenAPI document during generationnone
debugModelsDumps JSON formatted template-bound model information during generationnone
debugOperationsDumps JSON formatted template-bound operation information during generationnone
debugSupportingFilesDumps JSON formatted Supporting File information during generationnone
verboseDefines the verbositytrue or false
generateAliasAsModelDefines whether primitive types defined at the model/schema level will be wrapped in a modeltrue or false
org.openapitools.codegen.utils.oncelogger.enabledEnable/disable the "OnceLogger" which reduces noise for select repeated logstrue or false
supportingFilesAllows the user to define which supporting files will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of file names
modelsAllows the user to define which models will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of model names
apisAllows the user to define which apis will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of api names
apiDocsAllows the user to define if api docs will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
modelDocsAllows the user to define if model docs will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
apiTestsAllows the user to define if api tests will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
modelTestsAllows the user to define if model tests will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
withXmlAllows the user to control support of XML generated constructs, where supportednone

Note on Global Property declaration

There are two ways to provide selective generation properties or "global properties". First, these can be passed as Java System Properties. Second, these can be passed via the global property tooling option (--global-property in CLI and globalProperty in Maven and Gradle configurations). This differentiation is new in version 5.0 with the removal of the -D CLI option and the renaming of systemProperties. If you're upgrading to OpenAPI Generator 5.0+

While the examples seen in Customization use the Java System Property syntax, keep in mind that the following are equivalent:

java -Dmodels {jar} generate {opts}

and

java {jar} generate {opts} --global-property=models

Why the two differing ways to provide the same properties? We previously accepted a -D tooling option which resembled Java System Property declaration. In older versions of OpenAPI Generator, the option modified the SystemProperties collection directly and was truly a "system property". This option changed during the 4.x release in an effort to make OpenAPI Generator thread-safe and isolate its configuration via thread locals. We no longer mutate System Properties. In the 4.x release and earlier, specifying the tooling -D option with system properties intended for other tools like swagger-parser rather than passing them as true Java System Properties would lead to unexpected behavior for the user; if our tool set the system property after invoking certain code, it would seem to the user like Java System Properties weren't working!

Last updated on by Oleh Kurpiak
+

Global Properties

Available Global Properties

PropertyDescriptionAcceptable value
debugOpenAPIDumps JSON formatted and fully parsed OpenAPI document during generationnone
debugModelsDumps JSON formatted template-bound model information during generationnone
debugOperationsDumps JSON formatted template-bound operation information during generationnone
debugSupportingFilesDumps JSON formatted Supporting File information during generationnone
verboseDefines the verbositytrue or false
generateAliasAsModelDefines whether primitive types defined at the model/schema level will be wrapped in a modeltrue or false
org.openapitools.codegen.utils.oncelogger.enabledEnable/disable the "OnceLogger" which reduces noise for select repeated logstrue or false
supportingFilesAllows the user to define which supporting files will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of file names
modelsAllows the user to define which models will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of model names
apisAllows the user to define which apis will be generated. Prefer using the more robust .openapi-generator-ignore.no value, or a comma-separated string of api names
apiDocsAllows the user to define if api docs will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
modelDocsAllows the user to define if model docs will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
apiTestsAllows the user to define if api tests will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
modelTestsAllows the user to define if model tests will be generated. Prefer using the more robust .openapi-generator-ignore.true or false
withXmlAllows the user to control support of XML generated constructs, where supportednone

Note on Global Property declaration

There are two ways to provide selective generation properties or "global properties". First, these can be passed as Java System Properties. Second, these can be passed via the global property tooling option (--global-property in CLI and globalProperty in Maven and Gradle configurations). This differentiation is new in version 5.0 with the removal of the -D CLI option and the renaming of systemProperties. If you're upgrading to OpenAPI Generator 5.0+

While the examples seen in Customization use the Java System Property syntax, keep in mind that the following are equivalent:

java -Dmodels {jar} generate {opts}

and

java {jar} generate {opts} --global-property=models

Why the two differing ways to provide the same properties? We previously accepted a -D tooling option which resembled Java System Property declaration. In older versions of OpenAPI Generator, the option modified the SystemProperties collection directly and was truly a "system property". This option changed during the 4.x release in an effort to make OpenAPI Generator thread-safe and isolate its configuration via thread locals. We no longer mutate System Properties. In the 4.x release and earlier, specifying the tooling -D option with system properties intended for other tools like swagger-parser rather than passing them as true Java System Properties would lead to unexpected behavior for the user; if our tool set the system property after invoking certain code, it would seem to the user like Java System Properties weren't working!

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/installation/index.html b/docs/installation/index.html index 0b2f9b45d00..360efd8e561 100644 --- a/docs/installation/index.html +++ b/docs/installation/index.html @@ -31,14 +31,14 @@ Installing OpenAPI Generator's CLI tool allows users to generate all available generators from the command line.

Some of the following are cross-platform options and some are not, these are called out where possible.

npm

Platform(s): Linux, macOS, Windows

The npm package wrapper is cross-platform wrapper around the .jar artifact. It works by providing a CLI wrapper atop the JAR's command line options. This gives a simple interface layer which normalizes usage of the command line across operating systems, removing some differences in how options or switches are passed to the tool (depending on OS). Install the latest version of the tool globally, exposing the CLI on the command line:

npm install @openapitools/openapi-generator-cli -g

To install a specific version of the tool, pass the version during installation:

openapi-generator-cli version-manager set 5.3.0

To install the tool as a dev dependency in your current project:

npm install @openapitools/openapi-generator-cli -D

Then, generate a ruby client from a valid petstore.yaml doc:

npx @openapitools/openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/

npx will execute a globally available openapi-generator, and if not found it will fall back to project-local commands. The result is that the above command will work regardless of which installation method you've chosen.

Homebrew

Platform(s): macOS

Install via homebrew:

brew install openapi-generator

Then, generate a ruby client from a valid petstore.yaml doc:

openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/

Scoop

Platform(s): Windows

Install via scoop:

scoop install openapi-generator-cli

If you don't have java installed, you can also install it via scoop java bucket:

scoop bucket add java
scoop install openjdk

Then, generate a ruby client from a valid petstore.yaml doc:

openapi-generator-cli generate -i petstore.yaml -g ruby

Docker

Platform(s): Linux, macOS, Windows

The OpenAPI Generator Docker image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version.

To generate code from a valid petstore.yaml doc with this image, you'll need to mount a local location as a volume. You'll then need to output the generated code to this mapped volume. Everything else works the same as if you ran the command on your host machine.

Here's an example generating a Go client:

docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i /local/petstore.yaml \
-g go \
-o /local/out/go

JAR

Platform(s): Linux, macOS, Windows

If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):

JAR location: https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.0/openapi-generator-cli-5.3.0.jar

For Mac/Linux users:

wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.0/openapi-generator-cli-5.3.0.jar -O openapi-generator-cli.jar

For Windows users, you will need to install wget or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.

Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.3.0/openapi-generator-cli-5.3.0.jar

After downloading the JAR, run java -jar openapi-generator-cli.jar help to show the usage.

For Mac users, please make sure Java 8 is installed (Tips: run java -version to check the version), and export JAVA_HOME in order to use the supported Java version:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=${JAVA_HOME}/bin:$PATH

Bash Launcher Script

Platform(s): Linux, macOS, Windows (variable)

One downside to manual JAR downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at bin/utils/openapi-generator-cli.sh which solves this problem.

To install the launcher script, copy the contents of the script to a location on your path and make the script executable.

An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them).

mkdir -p ~/bin/openapitools
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli
chmod u+x ~/bin/openapitools/openapi-generator-cli
export PATH=$PATH:~/bin/openapitools/

Now, openapi-generator-cli is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar, -it will execute as normal. If a newer version is found, the script will download the latest release and execute it.

If you need to invoke an older version of the generator, you can define the variable OPENAPI_GENERATOR_VERSION either ad hoc or globally. You can export this variable if you'd like to persist a specific release version.

Examples:

# Execute latest released openapi-generator-cli
openapi-generator-cli version
# Execute version 3.1.0 for the current invocation, regardless of the latest released version
OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version
# Execute version 3.1.0-SNAPSHOT for the current invocation
OPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version
# Execute version 3.0.2 for every invocation in the current shell session
export OPENAPI_GENERATOR_VERSION=3.0.2
openapi-generator-cli version # is 3.0.2
openapi-generator-cli version # is also 3.0.2
# To "install" a specific version, set the variable in .bashrc/.bash_profile
echo "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc
source ~/.bashrc
openapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc
Last updated on by Oleh Kurpiak
+it will execute as normal. If a newer version is found, the script will download the latest release and execute it.

If you need to invoke an older version of the generator, you can define the variable OPENAPI_GENERATOR_VERSION either ad hoc or globally. You can export this variable if you'd like to persist a specific release version.

Examples:

# Execute latest released openapi-generator-cli
openapi-generator-cli version
# Execute version 3.1.0 for the current invocation, regardless of the latest released version
OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version
# Execute version 3.1.0-SNAPSHOT for the current invocation
OPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version
# Execute version 3.0.2 for every invocation in the current shell session
export OPENAPI_GENERATOR_VERSION=3.0.2
openapi-generator-cli version # is 3.0.2
openapi-generator-cli version # is also 3.0.2
# To "install" a specific version, set the variable in .bashrc/.bash_profile
echo "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc
source ~/.bashrc
openapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc
Last updated on by William Cheng
- + - + @@ -52,7 +52,7 @@ it will execute as normal. If a newer version is found, the script will download - + diff --git a/docs/integrations/index.html b/docs/integrations/index.html index 39a3b6f7de7..238fcef4689 100644 --- a/docs/integrations/index.html +++ b/docs/integrations/index.html @@ -27,14 +27,14 @@
-

Workflow Integrations

Workflow Integration (Gradle, Maven, GitHub, CI/CD)

Gradle Integration

See the openapi-generator-gradle-plugin README for details related to configuring and using the Gradle Plugin.

Supported tasks include:

  • Listing generators
  • Validation of Open API 2.0 and 3.0 Specs
  • Generating "Meta" generators
  • Generating all generators supported by OpenAPI Generator

Maven Integration

See the openapi-generator-maven-plugin README for details related to configuring and using the Maven Plugin.

sbt Integration

Please refer to https://github.com/OpenAPITools/sbt-openapi-generator

Bazel Integration

Please refer to https://github.com/OpenAPITools/openapi-generator-bazel

Cake Addin

3rd-party Cake Addin provided by Lukas Körfer: https://github.com/lukoerfer/cake-openapi-generator

GitHub Integration

To push the auto-generated SDK to GitHub, we provide git_push.sh to streamline the process. For example:

1) Create a new repository in GitHub (Ref: https://help.github.com/articles/creating-a-new-repository/)

2) Generate the SDK

java -jar openapi-generator-cli.jar generate \
-i modules/openapi-generator/src/test/resources/3_0/petstore.json -g perl \
--git-user-id "wing328" \
--git-repo-id "petstore-perl" \
--release-note "GitHub integration demo" \
-o /var/tmp/perl/petstore

3) Push the SDK to GitHub

cd /var/tmp/perl/petstore
/bin/sh ./git_push.sh

CI/CD

Some generators also generate CI/CD configuration files (.travis.yml) so that the output will be ready to be tested by the CI (e.g. Travis)

If you're looking for the configuration files of a particular CI that is not yet supported, please open an issue to let us know.

Last updated on by Oleh Kurpiak
+

Workflow Integrations

Workflow Integration (Gradle, Maven, GitHub, CI/CD)

Gradle Integration

See the openapi-generator-gradle-plugin README for details related to configuring and using the Gradle Plugin.

Supported tasks include:

  • Listing generators
  • Validation of Open API 2.0 and 3.0 Specs
  • Generating "Meta" generators
  • Generating all generators supported by OpenAPI Generator

Maven Integration

See the openapi-generator-maven-plugin README for details related to configuring and using the Maven Plugin.

sbt Integration

Please refer to https://github.com/OpenAPITools/sbt-openapi-generator

Bazel Integration

Please refer to https://github.com/OpenAPITools/openapi-generator-bazel

Cake Addin

3rd-party Cake Addin provided by Lukas Körfer: https://github.com/lukoerfer/cake-openapi-generator

GitHub Integration

To push the auto-generated SDK to GitHub, we provide git_push.sh to streamline the process. For example:

1) Create a new repository in GitHub (Ref: https://help.github.com/articles/creating-a-new-repository/)

2) Generate the SDK

java -jar openapi-generator-cli.jar generate \
-i modules/openapi-generator/src/test/resources/3_0/petstore.json -g perl \
--git-user-id "wing328" \
--git-repo-id "petstore-perl" \
--release-note "GitHub integration demo" \
-o /var/tmp/perl/petstore

3) Push the SDK to GitHub

cd /var/tmp/perl/petstore
/bin/sh ./git_push.sh

CI/CD

Some generators also generate CI/CD configuration files (.travis.yml) so that the output will be ready to be tested by the CI (e.g. Travis)

If you're looking for the configuration files of a particular CI that is not yet supported, please open an issue to let us know.

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/new-generator/index.html b/docs/new-generator/index.html index b27919fb082..d5636fa5239 100644 --- a/docs/new-generator/index.html +++ b/docs/new-generator/index.html @@ -27,14 +27,14 @@
-

Create a New Generator

Creating a new generator which will become a part of the officially supported generators in OpenAPI Generator is pretty simple. We've created a helper script to bootstrap the operation. Let's look at the files necessary to create a new generator, then an example of bootstrapping a generator using the new.sh script in the root of the repository.

Required Files

The minimum set of files required to create a new generator are:

  • A "Codegen" file
    • exists under modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/
    • defines language options
    • defines framework options
    • determines OpenAPI feature set
    • extends the generation workflow
  • SPI registration
    • Above class must be referenced in modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
    • Tells the generator that this class exists
    • Allows for classpath extension (addition) of generators
  • A minimal template
    • Should include a README explaining usage
    • Must include an api.mustache
    • Exists under modules/openapi-generator/src/main/resources/ (plus embeddedTemplate dir value, see below)
  • Config file under ./bin/configs
    • Gives users a "real life" example of generated output
    • Samples are used by CI to verify generators and test for regressions in some cases

Now, let's generate an example generator and then walk through the pieces. At the end, we'll touch on some known sticking points for new generator authors and provide some suggestions.

new.sh

The new.sh script in the root of the project is meant to simplify this process. Run ./new.sh --help.

Stubs out files for new generators
Usage:
./new.sh [options]
Options:
-n Required. Specify generator name, should be kebab-cased.
-c Create a client generator
-s Create a server generator
-d Create a documentation generator
-H Create a schema generator
-f Create a config generator
-t When specified, creates test file(s) for the generator.
-h Display help.
Examples:
Create a server generator for ktor:
./new.sh -n kotlin -s
Creates:
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
modules/openapi-generator/src/main/resources/kotlin-server/README.mustache
modules/openapi-generator/src/main/resources/kotlin-server/model.mustache
modules/openapi-generator/src/main/resources/kotlin-server/api.mustache
bin/configs/kotlin-server-petstore-new.yaml
Create a generic C# server generator:
./new.sh -n csharp -s -t
Creates:
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpServerCodegen.java
modules/openapi-generator/src/main/resources/csharp-server/README.mustache
modules/openapi-generator/src/main/resources/csharp-server/model.mustache
modules/openapi-generator/src/main/resources/csharp-server/api.mustache
bin/configs/csharp-server-petstore-new.yaml
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenModelTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenOptionsTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/options/CsharpServerCodegenOptionsProvider.java

This script allows us to define a client, server, schema, or documentation generator. We'll focus on the simplest generator (documentation). The other generator types may require heavy extension of the "Config" base class, and these docs could very quickly become outdated. When creating a new generator, please review existing generators as a guideline for implementation.

Create a new Markdown generator, specifying CommonMark as the name to avoid conflicting with the built-in Markdown generator.

./new.sh -n common-mark -d

You should see output similar to the following:

Creating modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CommonMarkDocumentationCodegen.java
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/README.mustache
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/model.mustache
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/api.mustache
Creating bin/configs/common-mark-documentation-petstore-new.yaml
Finished.

Review Generated Config

Beginning with the "Codegen" file (CommonMarkDocumentationCodegen.java), the constructor was created:

public CommonMarkDocumentationCodegen() {
super();
outputFolder = "generated-code" + File.separator + "common-mark";
modelTemplateFiles.put("model.mustache", ".zz");
apiTemplateFiles.put("api.mustache", ".zz");
embeddedTemplateDir = templateDir = "common-mark-documentation";
apiPackage = File.separator + "Apis";
modelPackage = File.separator + "Models";
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
// TODO: Fill this out.
}

These options are some defaults which may require updating. Let's look line-by-line at the config.

outputFolder = "generated-code" + File.separator + "common-mark";

This is the default output location. This will be generated-code/common-mark on non-Windows machines and generated-code\common-mark on Windows. You may change this to any value you'd like, but a user will almost always provide an output directory.

When joining paths, always use File.seperator

modelTemplateFiles.put("model.mustache", ".zz");

The model.mustache file is registered as the template for model generation. The new.sh script doesn't have a way to know your intended file extension, so we default to a .zz extension. This must be changed (unless your generator's target extension is .zz). For this example, you'd change .zz to .md or .markdown, depending on your preference.

This model template registration will use model.mustache to generate a new file for every model defined in your API's specification document.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

apiTemplateFiles.put("api.mustache", ".zz");

This is the template used for generating API related files. Similar to the above model template, you'll want to change .zz to .md or .markdown.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

embeddedTemplateDir = templateDir = "common-mark-documentation";

This line sets the embedded and template directories to common-mark-documentation. The embeddedTemplateDir refers to the directory which will exist under modules/openapi-generator/src/main/resources and will be published with every release in which your new generator is present.

The templateDir variable refers to the "current" template directory setting, as defined by the user. That is, the user may invoke with -t or --template-directory (or plugin option variants), and override this directory.

Both of these variables exist because the generator will fallback to files under embeddedTemplateDir if they are not defined in the user's custom template directory.

apiPackage = "Apis";

This sets the "package" location for anything considered an API document. You might want to change this setting if, for instance, your language doesn't support uppercase letters in the path. We don't need to worry about that here.

Every templated output from api.mustache (registered via apiTemplateFiles above) will end up in the directory defined by apiPackage here.

modelPackage = "Models";

Similarly, this sets the package for Models.

Every templated output from model.mustache (registered via modelTemplateFiles above) will end up in the directory defined by modelPackage here.

supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));

A "supporting file" is an extra file which isn't created once for every operation or model defined in your specification document. It is a single file which may or may not be templated (determined by the extension of the filename).

A supporting file only passes through the Mustache template processor if the filename ends in .mustache.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

If you want your readme to be generic (not templated), just rename the file to README.md and change README.mustache to README.md above.

Create templates

The new.sh created our three required files. Let's start filling out each of these files.

README.mustache

# Documentation for {{appName}}
{{#generateApiDocs}}
<a name="documentation-for-api-endpoints"></a>
## Documentation for API Endpoints
All URIs are relative to *{{{basePath}}}*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
{{/generateApiDocs}}
{{#generateModelDocs}}
<a name="documentation-for-models"></a>
## Documentation for Models
{{#modelPackage}}
{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}
{{/modelPackage}}
{{^modelPackage}}
No model defined in this package
{{/modelPackage}}
{{/generateModelDocs}}
<a name="documentation-for-authorization"></a>{{! TODO: optional documentation for authorization? }}
## Documentation for Authorization
{{^authMethods}}
All endpoints do not require authorization.
{{/authMethods}}
{{#authMethods}}
{{#last}}
Authentication schemes defined for the API:
{{/last}}
{{/authMethods}}
{{#authMethods}}
<a name="{{name}}"></a>
### {{name}}
{{#isApiKey}}- **Type**: API key
- **API key parameter name**: {{keyParamName}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}- **Type**: HTTP basic authentication
{{/isBasic}}
{{#isOAuth}}- **Type**: OAuth
- **Flow**: {{flow}}
- **Authorization URL**: {{authorizationUrl}}
- **Scopes**: {{^scopes}}N/A{{/scopes}}
{{#scopes}} - {{scope}}: {{description}}
{{/scopes}}
{{/isOAuth}}
{{/authMethods}}

Let's not focus too much on the contents of this file. You may refer to templating for more details on the variables bound to these files and to debugging how to debug the structures. Of note here is that we're generating structures in markdown as defined by the objects constructed by our new "Config" class.

api.mustache

The API documentation might look like this:

# {{classname}}{{#description}}
{{description}}{{/description}}
All URIs are relative to *{{basePath}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
<a name="{{operationId}}"></a>
# **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}}
{{notes}}{{/notes}}
### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}
{{/allParams}}
### Return type
{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}
### Authorization
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}
### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{/operation}}
{{/operations}}

model.mustache

The models file could resemble the following.

{{#models}}
{{#model}}
# {{{packageName}}}.{{modelPackage}}.{{{classname}}}
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#parent}}
{{#parentVars}}
**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/parentVars}}
{{/parent}}
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}
{{/models}}

Build it

To compile quickly to test this out, you can run mvn clean package -DskipTests.

When implementing a more robust generator, you'll want to run all tests as well: mvn clean package

Compile Sample

The new.sh script created the generation config file bin/configs/common-mark-documentation-petstore-new.yaml:

generatorName: common-mark
outputDir: samples/documentation/petstore/common/mark
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/common-mark
additionalProperties:
hideGenerationTimestamp: "true"

This configuration file is passed to the generator's CLI tool during continuous integration builds, and many outputs are compiled and tested as a regression test on every build. Contributors are also asked to run ./bin/utils/ensure-up-to-date before opening a pull request to regenerate all samples defined under ./bin/configs. This allows maintainers to quickly verify whether changes impact other generators.

Configuration based examples allow us to test the same samples in each tooling option (CLI, Gradle Plugin, Maven Plugin, etc.).

You can compile your generator by running:

./bin/generate-samples.sh bin/configs/common-mark-documentation-petstore-new.yaml

This configuration file can be used to demonstrate the default options for generation. A common option in most of these configs is to define the template directory as the generator's directory under resources. This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a CliOption).

Verify output

Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works.

For markdown, you can open in Visual Studio Code or any other editor with a markdown preview. Not all editors support relative links to other markdown documents. To test the output in this guide, install markserv:

npm install --global markserv

Now, you can serve the output directory directly and test your links:

markserv samples/documentation/petstore/common/markdown

That's it! You've created your first generator!

Last updated on by Oleh Kurpiak
+

Create a New Generator

Creating a new generator which will become a part of the officially supported generators in OpenAPI Generator is pretty simple. We've created a helper script to bootstrap the operation. Let's look at the files necessary to create a new generator, then an example of bootstrapping a generator using the new.sh script in the root of the repository.

Required Files

The minimum set of files required to create a new generator are:

  • A "Codegen" file
    • exists under modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/
    • defines language options
    • defines framework options
    • determines OpenAPI feature set
    • extends the generation workflow
  • SPI registration
    • Above class must be referenced in modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
    • Tells the generator that this class exists
    • Allows for classpath extension (addition) of generators
  • A minimal template
    • Should include a README explaining usage
    • Must include an api.mustache
    • Exists under modules/openapi-generator/src/main/resources/ (plus embeddedTemplate dir value, see below)
  • Config file under ./bin/configs
    • Gives users a "real life" example of generated output
    • Samples are used by CI to verify generators and test for regressions in some cases

Now, let's generate an example generator and then walk through the pieces. At the end, we'll touch on some known sticking points for new generator authors and provide some suggestions.

new.sh

The new.sh script in the root of the project is meant to simplify this process. Run ./new.sh --help.

Stubs out files for new generators
Usage:
./new.sh [options]
Options:
-n Required. Specify generator name, should be kebab-cased.
-c Create a client generator
-s Create a server generator
-d Create a documentation generator
-H Create a schema generator
-f Create a config generator
-t When specified, creates test file(s) for the generator.
-h Display help.
Examples:
Create a server generator for ktor:
./new.sh -n kotlin -s
Creates:
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
modules/openapi-generator/src/main/resources/kotlin-server/README.mustache
modules/openapi-generator/src/main/resources/kotlin-server/model.mustache
modules/openapi-generator/src/main/resources/kotlin-server/api.mustache
bin/configs/kotlin-server-petstore-new.yaml
Create a generic C# server generator:
./new.sh -n csharp -s -t
Creates:
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CsharpServerCodegen.java
modules/openapi-generator/src/main/resources/csharp-server/README.mustache
modules/openapi-generator/src/main/resources/csharp-server/model.mustache
modules/openapi-generator/src/main/resources/csharp-server/api.mustache
bin/configs/csharp-server-petstore-new.yaml
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenModelTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpServerCodegenOptionsTest.java
modules/openapi-generator/src/test/java/org/openapitools/codegen/options/CsharpServerCodegenOptionsProvider.java

This script allows us to define a client, server, schema, or documentation generator. We'll focus on the simplest generator (documentation). The other generator types may require heavy extension of the "Config" base class, and these docs could very quickly become outdated. When creating a new generator, please review existing generators as a guideline for implementation.

Create a new Markdown generator, specifying CommonMark as the name to avoid conflicting with the built-in Markdown generator.

./new.sh -n common-mark -d

You should see output similar to the following:

Creating modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CommonMarkDocumentationCodegen.java
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/README.mustache
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/model.mustache
Creating modules/openapi-generator/src/main/resources/common-mark-documentation/api.mustache
Creating bin/configs/common-mark-documentation-petstore-new.yaml
Finished.

Review Generated Config

Beginning with the "Codegen" file (CommonMarkDocumentationCodegen.java), the constructor was created:

public CommonMarkDocumentationCodegen() {
super();
outputFolder = "generated-code" + File.separator + "common-mark";
modelTemplateFiles.put("model.mustache", ".zz");
apiTemplateFiles.put("api.mustache", ".zz");
embeddedTemplateDir = templateDir = "common-mark-documentation";
apiPackage = File.separator + "Apis";
modelPackage = File.separator + "Models";
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
// TODO: Fill this out.
}

These options are some defaults which may require updating. Let's look line-by-line at the config.

outputFolder = "generated-code" + File.separator + "common-mark";

This is the default output location. This will be generated-code/common-mark on non-Windows machines and generated-code\common-mark on Windows. You may change this to any value you'd like, but a user will almost always provide an output directory.

When joining paths, always use File.seperator

modelTemplateFiles.put("model.mustache", ".zz");

The model.mustache file is registered as the template for model generation. The new.sh script doesn't have a way to know your intended file extension, so we default to a .zz extension. This must be changed (unless your generator's target extension is .zz). For this example, you'd change .zz to .md or .markdown, depending on your preference.

This model template registration will use model.mustache to generate a new file for every model defined in your API's specification document.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

apiTemplateFiles.put("api.mustache", ".zz");

This is the template used for generating API related files. Similar to the above model template, you'll want to change .zz to .md or .markdown.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

embeddedTemplateDir = templateDir = "common-mark-documentation";

This line sets the embedded and template directories to common-mark-documentation. The embeddedTemplateDir refers to the directory which will exist under modules/openapi-generator/src/main/resources and will be published with every release in which your new generator is present.

The templateDir variable refers to the "current" template directory setting, as defined by the user. That is, the user may invoke with -t or --template-directory (or plugin option variants), and override this directory.

Both of these variables exist because the generator will fallback to files under embeddedTemplateDir if they are not defined in the user's custom template directory.

apiPackage = "Apis";

This sets the "package" location for anything considered an API document. You might want to change this setting if, for instance, your language doesn't support uppercase letters in the path. We don't need to worry about that here.

Every templated output from api.mustache (registered via apiTemplateFiles above) will end up in the directory defined by apiPackage here.

modelPackage = "Models";

Similarly, this sets the package for Models.

Every templated output from model.mustache (registered via modelTemplateFiles above) will end up in the directory defined by modelPackage here.

supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));

A "supporting file" is an extra file which isn't created once for every operation or model defined in your specification document. It is a single file which may or may not be templated (determined by the extension of the filename).

A supporting file only passes through the Mustache template processor if the filename ends in .mustache.

The path is considered relative to embeddedTemplateDir, templateDir, or a library subdirectory (refer to the Java client generator implementation for a prime example).

If you want your readme to be generic (not templated), just rename the file to README.md and change README.mustache to README.md above.

Create templates

The new.sh created our three required files. Let's start filling out each of these files.

README.mustache

# Documentation for {{appName}}
{{#generateApiDocs}}
<a name="documentation-for-api-endpoints"></a>
## Documentation for API Endpoints
All URIs are relative to *{{{basePath}}}*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
{{/generateApiDocs}}
{{#generateModelDocs}}
<a name="documentation-for-models"></a>
## Documentation for Models
{{#modelPackage}}
{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}}
{{/modelPackage}}
{{^modelPackage}}
No model defined in this package
{{/modelPackage}}
{{/generateModelDocs}}
<a name="documentation-for-authorization"></a>{{! TODO: optional documentation for authorization? }}
## Documentation for Authorization
{{^authMethods}}
All endpoints do not require authorization.
{{/authMethods}}
{{#authMethods}}
{{#last}}
Authentication schemes defined for the API:
{{/last}}
{{/authMethods}}
{{#authMethods}}
<a name="{{name}}"></a>
### {{name}}
{{#isApiKey}}- **Type**: API key
- **API key parameter name**: {{keyParamName}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}- **Type**: HTTP basic authentication
{{/isBasic}}
{{#isOAuth}}- **Type**: OAuth
- **Flow**: {{flow}}
- **Authorization URL**: {{authorizationUrl}}
- **Scopes**: {{^scopes}}N/A{{/scopes}}
{{#scopes}} - {{scope}}: {{description}}
{{/scopes}}
{{/isOAuth}}
{{/authMethods}}

Let's not focus too much on the contents of this file. You may refer to templating for more details on the variables bound to these files and to debugging how to debug the structures. Of note here is that we're generating structures in markdown as defined by the objects constructed by our new "Config" class.

api.mustache

The API documentation might look like this:

# {{classname}}{{#description}}
{{description}}{{/description}}
All URIs are relative to *{{basePath}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
<a name="{{operationId}}"></a>
# **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}}
{{notes}}{{/notes}}
### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}
{{/allParams}}
### Return type
{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}
### Authorization
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}
### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{/operation}}
{{/operations}}

model.mustache

The models file could resemble the following.

{{#models}}
{{#model}}
# {{{packageName}}}.{{modelPackage}}.{{{classname}}}
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#parent}}
{{#parentVars}}
**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/parentVars}}
{{/parent}}
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
{{/vars}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}}
{{/models}}

Build it

To compile quickly to test this out, you can run mvn clean package -DskipTests.

When implementing a more robust generator, you'll want to run all tests as well: mvn clean package

Compile Sample

The new.sh script created the generation config file bin/configs/common-mark-documentation-petstore-new.yaml:

generatorName: common-mark
outputDir: samples/documentation/petstore/common/mark
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/common-mark
additionalProperties:
hideGenerationTimestamp: "true"

This configuration file is passed to the generator's CLI tool during continuous integration builds, and many outputs are compiled and tested as a regression test on every build. Contributors are also asked to run ./bin/utils/ensure-up-to-date before opening a pull request to regenerate all samples defined under ./bin/configs. This allows maintainers to quickly verify whether changes impact other generators.

Configuration based examples allow us to test the same samples in each tooling option (CLI, Gradle Plugin, Maven Plugin, etc.).

You can compile your generator by running:

./bin/generate-samples.sh bin/configs/common-mark-documentation-petstore-new.yaml

This configuration file can be used to demonstrate the default options for generation. A common option in most of these configs is to define the template directory as the generator's directory under resources. This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a CliOption).

Verify output

Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works.

For markdown, you can open in Visual Studio Code or any other editor with a markdown preview. Not all editors support relative links to other markdown documents. To test the output in this guide, install markserv:

npm install --global markserv

Now, you can serve the output directory directly and test your links:

markserv samples/documentation/petstore/common/markdown

That's it! You've created your first generator!

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/online/index.html b/docs/online/index.html index d26732ec6e6..9b50a1ac81d 100644 --- a/docs/online/index.html +++ b/docs/online/index.html @@ -28,14 +28,14 @@

Online

Hosted

We offer online services, publicly and free of charge:

Hosting Sponsor
-Linode Logo

These services are beta and do not have any guarantee on service level

Docker Image

The openapi-generator-online Docker image can act as a self-hosted web application and API for generating code. This container can be incorporated into a CI pipeline, and requires at least two HTTP requests and some docker orchestration to access generated code.

Example usage:

# Start container at port 8888 and save the container id
CID=$(docker run -d -p 8888:8080 openapitools/openapi-generator-online)
# allow for startup
sleep 10
# Get the IP of the running container (optional)
GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' ${CID})
# Execute an HTTP request to generate a Ruby client
curl -X POST --header 'Content-Type: application/json' \
--header 'Accept: application/json' \
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
'http://localhost:8888/api/gen/clients/ruby'
# Example output:
# {"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"}
# Download the generated zip file (using "code" provided from your output)
wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8
# Unzip the file
unzip c2d483.3.4672-40e9-91df-b9ffd18d22b8
# Shutdown the openapi generator image
docker stop ${CID} && docker rm ${CID}

Local/Self-hosting

If you prefer to run the service locally, here are the steps:

mvn clean install
cd modules/openapi-generator-online
mvn spring-boot:run

The online openapi-generator can be run via Docker as well.

For example, to generate Ruby API client, simply send the following HTTP request using curl:

curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
http://localhost:8080/api/gen/clients/ruby

Then you will receive a JSON response with the URL to download the zipped code.

To customize the SDK, you can POST to http://localhost:8080/gen/clients/{generator} with the following HTTP body:

{
"options": {},
"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
}

Here, the options for a language can be obtained by submitting a GET request to http://locahost:8080/api/gen/clients/{generator}:

For example, curl http://localhost:8080/api/gen/clients/python returns

"packageName":{
"opt":"packageName",
"description":"python package name (convention: snake_case).",
"type":"string",
"default":"openapi_client"
},
"packageVersion":{
"opt":"packageVersion",
"description":"python package version.",
"type":"string",
"default":"1.0.0"
},
"sortParamsByRequiredFlag":{
"opt":"sortParamsByRequiredFlag",
"description":"Sort method arguments to place required parameters before optional parameters.",
"type":"boolean",
"default":"true"
}
{}

To set package name to pet_store, the HTTP body of the request is as follows:

{
"options": {
"packageName": "pet_store"
},
"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
}

and here is the curl command:

curl -H "Content-type: application/json" \
-X POST \
-d '{"options": {"packageName": "pet_store"},"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
http://localhost:8080/api/gen/clients/python

Instead of using openAPIUrl with an URL to the OpenAPI spec, one can include the spec in the JSON payload with spec:

{
"options": {},
"spec": {
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Test API"
},
...
}
}
Last updated on by Oleh Kurpiak
+Linode Logo

These services are beta and do not have any guarantee on service level

Docker Image

The openapi-generator-online Docker image can act as a self-hosted web application and API for generating code. This container can be incorporated into a CI pipeline, and requires at least two HTTP requests and some docker orchestration to access generated code.

Example usage:

# Start container at port 8888 and save the container id
CID=$(docker run -d -p 8888:8080 openapitools/openapi-generator-online)
# allow for startup
sleep 10
# Get the IP of the running container (optional)
GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' ${CID})
# Execute an HTTP request to generate a Ruby client
curl -X POST --header 'Content-Type: application/json' \
--header 'Accept: application/json' \
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
'http://localhost:8888/api/gen/clients/ruby'
# Example output:
# {"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"}
# Download the generated zip file (using "code" provided from your output)
wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8
# Unzip the file
unzip c2d483.3.4672-40e9-91df-b9ffd18d22b8
# Shutdown the openapi generator image
docker stop ${CID} && docker rm ${CID}

Local/Self-hosting

If you prefer to run the service locally, here are the steps:

mvn clean install
cd modules/openapi-generator-online
mvn spring-boot:run

The online openapi-generator can be run via Docker as well.

For example, to generate Ruby API client, simply send the following HTTP request using curl:

curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
http://localhost:8080/api/gen/clients/ruby

Then you will receive a JSON response with the URL to download the zipped code.

To customize the SDK, you can POST to http://localhost:8080/gen/clients/{generator} with the following HTTP body:

{
"options": {},
"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
}

Here, the options for a language can be obtained by submitting a GET request to http://locahost:8080/api/gen/clients/{generator}:

For example, curl http://localhost:8080/api/gen/clients/python returns

"packageName":{
"opt":"packageName",
"description":"python package name (convention: snake_case).",
"type":"string",
"default":"openapi_client"
},
"packageVersion":{
"opt":"packageVersion",
"description":"python package version.",
"type":"string",
"default":"1.0.0"
},
"sortParamsByRequiredFlag":{
"opt":"sortParamsByRequiredFlag",
"description":"Sort method arguments to place required parameters before optional parameters.",
"type":"boolean",
"default":"true"
}
{}

To set package name to pet_store, the HTTP body of the request is as follows:

{
"options": {
"packageName": "pet_store"
},
"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
}

and here is the curl command:

curl -H "Content-type: application/json" \
-X POST \
-d '{"options": {"packageName": "pet_store"},"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
http://localhost:8080/api/gen/clients/python

Instead of using openAPIUrl with an URL to the OpenAPI spec, one can include the spec in the JSON payload with spec:

{
"options": {},
"spec": {
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Test API"
},
...
}
}
Last updated on by William Cheng
- + - + @@ -49,7 +49,7 @@ - + diff --git a/docs/plugins/index.html b/docs/plugins/index.html index 6fc8392e47f..bd710cc7b6f 100644 --- a/docs/plugins/index.html +++ b/docs/plugins/index.html @@ -27,14 +27,14 @@
-

Plugins

Maven

A Maven plugin to support the OpenAPI generator project

Example

Add to your build->plugins section (default phase is generate-sources phase)

<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>5.1.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
<generatorName>java</generatorName>
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>

Followed by:

mvn clean compile

For full details of all options, see the plugin README.

Dependencies

The generated models use commonly used Swagger v2 annotations like @ApiModelProperty. A user may add Swagger v3 annotations:

<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>

But this will not work. This dependency is not binary compatible with Swagger v2 annotations. The resulting code will fail to compile.

As alternative instead use the following dependency:

<dependency>
<groupId>io.swagger.parser.v3</groupId>
<artifactId>swagger-parser</artifactId>
</dependency>

Gradle

This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options you’d pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you’re interested in the extension/task mapping concept from a high-level, you can check out Gradle’s docs.

To include in your project, add the following to build.gradle:

buildscript {
repositories {
mavenLocal()
maven { url "https://repo1.maven.org/maven2" }
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.0"
}
}
apply plugin: 'org.openapi.generator'

This gives access to the following tasks:

TaskDescription
openApiGenerateGenerate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents.
openApiGeneratorsLists generators available via Open API Generators.
openApiMetaGenerates a new generator to be consumed via Open API Generator.
openApiValidateValidates an Open API 2.0 or 3.x specification document.

The plugin implements the above tasks as project extensions of the same name. If you’d like to declare these tasks as dependencies to other tasks (using dependsOn), you’ll need a task reference. e.g.:

compileJava.dependsOn tasks.openApiGenerate

For full details of all options, see the plugin README.

Example

An example task for generating a kotlin client:

openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
configOptions = [
dateLibrary: "java8"
]
}
Last updated on by Oleh Kurpiak
+

Plugins

Maven

A Maven plugin to support the OpenAPI generator project

Example

Add to your build->plugins section (default phase is generate-sources phase)

<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>5.1.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
<generatorName>java</generatorName>
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>

Followed by:

mvn clean compile

For full details of all options, see the plugin README.

Dependencies

The generated models use commonly used Swagger v2 annotations like @ApiModelProperty. A user may add Swagger v3 annotations:

<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>

But this will not work. This dependency is not binary compatible with Swagger v2 annotations. The resulting code will fail to compile.

As alternative instead use the following dependency:

<dependency>
<groupId>io.swagger.parser.v3</groupId>
<artifactId>swagger-parser</artifactId>
</dependency>

Gradle

This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options you’d pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you’re interested in the extension/task mapping concept from a high-level, you can check out Gradle’s docs.

To include in your project, add the following to build.gradle:

buildscript {
repositories {
mavenLocal()
maven { url "https://repo1.maven.org/maven2" }
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.0"
}
}
apply plugin: 'org.openapi.generator'

This gives access to the following tasks:

TaskDescription
openApiGenerateGenerate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents.
openApiGeneratorsLists generators available via Open API Generators.
openApiMetaGenerates a new generator to be consumed via Open API Generator.
openApiValidateValidates an Open API 2.0 or 3.x specification document.

The plugin implements the above tasks as project extensions of the same name. If you’d like to declare these tasks as dependencies to other tasks (using dependsOn), you’ll need a task reference. e.g.:

compileJava.dependsOn tasks.openApiGenerate

For full details of all options, see the plugin README.

Example

An example task for generating a kotlin client:

openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
configOptions = [
dateLibrary: "java8"
]
}
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/release-3-0-0/index.html b/docs/release-3-0-0/index.html index 0b82337f225..2f57a0784cb 100644 --- a/docs/release-3-0-0/index.html +++ b/docs/release-3-0-0/index.html @@ -27,14 +27,14 @@
-

Release Notes: 3.0.0

  • Docker

  • 7dfd94002 Docker: use correct MAVEN_CONFIG (#182)

  • b5a0d173d Revise the usage of OpenAPI Generator online (docker image) (#73)

  • e58dc2c77 Fix COPY in Dockerfile (#64)

  • 9d7feaaeb Fix online generator (docker push) (#58)

  • 9247cd01e Changes for Docker

  • 64037ee59 update docker-related files to ues jdk8

  • Plug-ins

  • b6b8c0db8 [gradle-plugin] Initial implementation (#162)

  • 0a28aad73 [MAVEN PLUGIN] Checking for null configOptions before looking for property

  • 9c79297d6 [MAVEN PLUGIN] Use latest version in dependencies snippet

  • 9e1bbe0c1 Add maven wrapper

  • API Clients

  • Ada

  • edf6be8c0 [Ada] bug fix by defining x-is-model-type when property is local to the YML file

  • 9ba74f484 [Ada] Fix GNAT project and server skeleton to avoid sending a response when an error is returned

  • ea27924f5 [Ada] changed default project/package name, to solve circular dependencies

  • 6b9d38d40 remove trailing spaces in ada template

  • 0de7f972f Fix the Ada server skeleton to check the authsMethods in the Shared_Instance generic package

  • 4bd8fc6e8 Fix 7511: [Ada] Client call is not correct with multiple parameters and application/x-www-urlencoded

  • 3035bc629 [Ada] Hotfix/ada model sort

  • 43f0e8692 Ada code generator corrected: "=>" instead of "->".

  • 7d2b49085 [Ada] wrong order for generated structures in models.ads files

  • 2b2b85eec [Ada] wrong JSON in POST operations

  • C#

  • 0e34bcf4e [csharp] ctor params should always be camelCase

  • 872471996 [csharp] Support arrays of arrays for properties and models

  • 1c4e6b7d4 [csharp] Fix ToJson to work with composition and polymorphism

  • ed7af73f6 [csharp] Reference this.Configuration in client API template

  • C++

  • e796e4c36 [C++] Add linux as a reserve keyword

  • 36f69a034 remove trailing spaces in qt5 c++ templates

  • f192613f1 fix string type in c++ generator

  • 409015461 fix file type in qt5cpp

  • a4bcb3bc7 fix datetime and map type for qt5cpp

  • 23b31aba8 [qt5cpp] Fix crash when API return a map container

  • 3b031ed2b [qt5cpp] delete callback data allocated before signal emission

  • 1bb1e44d1 [qt5cpp] Remove qt5 pro.user file

  • 194722015 Qt5cpp plug memleaks part2

  • 12f3661d6 Qt5cpp plug memleaks

  • ea4b94842 [qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized

  • 0bf430a80 Qt5cpp Add support for nested containers

  • 0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema

  • 7c734445b fix file parameter in header file (cpprest)

  • 070b5c00b fix object type declaration in cpprest

  • bad1885b4 [cpprest] add parameterToString for number type with unspecified format (double)

  • 73bd24db7 [cpprest] Add support for nested vectors

  • ee2eb74f7 [qt] update Qt client

  • d82499944 Adding qt project generation fix

  • 9bd94b4db [qt] Fix warning message

  • Clojure

  • d7e374504 [Clojure] Add util method to set the api-context globally (#93)

  • Dart

  • f1638a659 [Dart] Allow setting an accessToken for OAuth

  • a5e26a44f [Dart] - Rework Dart client generator to be flutter-compatible

  • Elixir

  • f9b2839a3 [Elixir] Check date value before calling to_iso8601

  • Elm

  • 5a87fe695 [elm] Fix operations with empty responses (#171)

  • a5cf27b60 Fix Petstore example for Elm (#96)

  • c522927d5 Fix Elm generator for polymorphism (#78)

  • 7d9fb9f51 Add CI test for Elm in travis (#40)

  • 769a65c95 [Elm] Add support for array schemas

  • 56a0268e3 [elm] missing '->' in Main elm template

  • Erlang

  • c73118524 [erlang-client] Erlang request utils

  • 049eef9c5 Test erlang client, server petstore

  • bcc7b788e fix erlang client compilation error

  • Go

  • acb63fd5e Fix go readme, remove resty install

  • 5d8362d85 Update go client, fix double body read

  • 47614bb76 Properly capitalize exported go types

  • ee561fcd6 Add withXml option for Go language

  • 0f6696089 [Go] Use consistent indentation in readme

  • 72abb20f2 [Go] Fix operation files clobbering model files. [2.4.0]

  • Haskell

  • 34db79b9b [haskell-http-client] update dependency versions + readme (#81)

  • e45b3784f Fix NPE with Haskell client generator with OAS3 spec

  • d3401396f [haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue

  • 4bc99b9da minor fixes to haskell http client generator

  • 2d0bafb6b [haskell-http-client] default InlineMimeTypes=true

  • 9fba9c325 [haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType

  • Kotlin

  • a3322fbf7 [kotlin] Add OkHttpClient.Builder to ApiClient.

  • 3c5fb1d80 [kotlin] Add json annotation to each enum value.

  • 39fa375e3 [kotlin] Fix NPE for POST/PUT/PATCH with empty request models.

  • c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type

  • c69925b53 [Kotlin] Fix issues with threetenbp

  • a811a48c3 minor fix to kotlin client generator due to merge conflict

  • 914275fe7 [kotlin] support selection of datelibrary

  • a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template

  • Lua

  • dbe78e23e [Lua] Improve auto-generated test files

  • 6c79052ac Add auto-generated Lua spec files for APIs, models

  • 38a2c1dde [Lua] Fix Rockpec

  • a2410b210 Add auto-generated rockspec file to Lua API client

  • df10c725a Add lua test script, minor fix to Lua API files

  • Java

  • 2e69e6c03 build.gradle should not have commas

  • 1a4e5a4e5 Java client: Add constants for libraries (#163)

  • 7db0201a8 Fix NPEs in Java generator (#154)

  • 4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151)

  • 072ce070b resteasy: fix outer enum case (#139)

  • ccd002966 [Java] rest-assured: fix javadoc in templates

  • e7410d4c8 Allow $ in java var name

  • 03490e923 Fix Java binary mapping

  • 70b4b55fa Fix performance linting problem with maps in Java ApiClient template

  • cddcda0fe [Java][Jersey2] Make generated client code thread safe

  • 298ca8d35 use correct jackson date library when using Java 8

  • 53eeb0c04 [Java] fix connection leak on retrofit OAuth token renewal

  • 61c25e711 [Java] Fixes for retrofit

  • f02332755 [JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger.

  • 4eeb974cb [Java][google-api-client] Fix bug with empty POST request not sending content-type

  • d4543a99e [Java][retrofit2] file upload sets filename as baseName instead of a dynamic filename

  • 62a930223 [JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom…

  • fec0363f7 [Java] Add back byte array enhancement

  • 59ff4c198 [Java][library: vertx] Add default value and required parameter support to vertx server temp…

  • 3bd2da9a8 [Java] Fix build warnings

  • 429b96ae7 [JAVA] equals and hashCode for models with byte[] and binary strings

  • 495971c2c [Java] use html entities in javadoc of generated code (#106)

  • 82ee8656f [java] Enum in array of array (#66)

  • bf7e4e7df Java gson: add @SerializedName value as constant (#22)

  • 30c1448d7 Fix build.gradle for Java RESTEasy client

  • 642c0566d [Java] Use Rx2 Completable for Void Retrofit2 responses

  • 72221b1cf Adding @Deprecated to retrofit2 client interfaces.

  • 47111b324 [Java] fix gson deserialize format byte

  • 9e06f7063 [Java] Fix assignment of new object instance to variable

  • 006f084b5 [Java] Allow to set values with setApiPackage(..) and setModelPackage(..)

  • JavaScript/NodeJS

  • d80e29585 Fix JS test using baseName in default value (#5)

  • fe15f4690 fix toDefaultValueWithParam in JS

  • 90859575e Fixing variable name typo (instane -> instance)

  • Objective-C

  • 9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest

  • 5d1874028 add class as a keyword in objc generator

  • 1b8df5c20 Update ObjcClientCodegen.java

  • 246ed5754 restore objc reserved word: property

  • PHP

  • 3beeb4e77 [PHP] Not-required properties now shows as nullable (#129)

  • 37df59d6f [PHP] Adjust the names (script, sample folder, generator) to lang option (#159)

  • 4a5d16b23 [PHP] Fix string length validation

  • d58835e57 [PHP] Improve: Make validation strict

  • cf8d8d56f [PHP] Fix code example from README. Variable name was missing when using Basic auth.

  • 0adbf7e51 [PHP] Improve: update sample tests automatically

  • 32cf2f16f [PHP] Non required enum property

  • 3bcf0ff76 [PHP] Add path & file separator (/) to return the correct path when deserializing a file

  • 14e1e1980 [PHP] Improve validation on empty arrays

  • 809e1f4c9 [PHP] Cleanup tests

  • 76907cacd [PHP] declare property headerSelector

  • Python

  • 7184f1ec6 [python] asyncio supports _preload_content; remove unused imports (#107)

  • d74d2ba03 fix: python clients

  • 8e0a0ebd6 Fix python / tornado body handling

  • b39c35c76 Fix inconsistency between model name and file name in python client

  • dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client

  • f6e0e297e [python-asyncio] tests and fixes

  • R

  • 61e58d649 Add R namespace file

  • Ruby

  • a08164592 fix ruby parameters in documentation, fix requiredParams, optionalParams

  • 8e34f9a98 update to newer version of ruby

  • aa6b217bb [Ruby] Add auto-generated rubocop config file

  • Rust

  • b44357394 [Rust] Implement minimal auth support

  • 0b845a57e [Rust] Changes hard coded body to dynamic parameter name -

  • a3c97753f [Rust] Handles UUID as string

  • 027df610b [Rust] Handle error response statuses

  • 66be7a791 [Rust] Add user agent handling for rust template (master)

  • 3029b7b0f [Rust] Format example with rustfmt

  • Scala

  • 197b4481e normalize akka-scala and Java README

  • 612cfb7af [Akka-scala] Clean unused dependencies such swagger-core

  • 86697fedb [Scala][Gatling] correct body params filename

  • 832919b84 [Scala][Akka] Remove unused dep when model package is empty

  • Swift

  • 40d5d0990 [Swift4] accept empty content with default client

  • 3b7230b17 [Swift 4] Fix APIHelper to accept array parameter

  • e22faf4cd [Swift] Add public initializer for modelObject.

  • b184fb1d9 [Swift3] escape URL parameters

  • 52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test

  • a3d0f1d4b Swift4: make generated models structs instead of classes

  • TypeScript

  • f615d823f update ts node dependencies

  • 9ac9bc0dc [TypeScript] enhance ts import

  • 009dcf009 Mark not required swagger properties as optional typescript properties

  • bdd2c2a4e Misc typescript Angular code generation improvements

  • 260375c9e Fix typescript-node generation of array type models

  • d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param

  • 20305139b [Feature][TypeScript] request param enum as literal unions

  • 524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular

  • 9b8602311 [TypeScript] Make OpenAPI Generator serialize subclasses properly (#102)

  • 4bc5ffe86 [typescript-angular] add provided in support (#120)

  • ef832e715 [Feature][TS Angular] improve docs angular import

  • fc7e08346 [TS][Fetch] Add interfaces option

  • 157e6b7fa [angular] Add option to generate tagged unions

  • 7faaa091c Fix generated module imports in Aurelia APIs

  • b5f0b24ba [TS] fix object declaration in model

  • API Servers

  • C++

  • 6fef0a7ff fix string issue with restbed generator

  • a339422bd move get type declaration method to c++ restbed

  • C#

  • d9d653016 [aspnetcore] Make the use of Swashbuckle optional (#110)

  • 9a8183ab0 [aspnetcore] Fix openapi.json location rename (#56)

  • 12abfb968 [aspnetcore] Update Dockerfile

  • 866817587 [aspnetcore] Fix string enum generation

  • Java

  • bd50d368e [JAVA - jaxrs-resteasy-eap] Add import to models (#179)

  • 7efda597c Fix issue with useBeanValidation option in Java server generators (#160)

  • 71b5de3ed Do not set contextPath for spring-boot (#104)

  • b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131)

  • 4d7fc046f [JaxRS] Add "validation-api" dependency in jetty (#30)

  • ce930e7a6 [Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)

  • 386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client"

  • 5d92717dc update jaxrs to listen at port 10080

  • 7c2031675 update artifact id for jaxrs datelib j8

  • 88c5112f2 Adds support for returning response in jaxrs-spec interfaces

  • 6bf84d5fa [JAXRS-SPEC] Fix lowercase enums sent as uppercase

  • 3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85)

  • 161948657 Add reactive option for Spring Boot (webflux)

  • ff1178ad7 [Java][Spring] fix missing optional query params

  • 2103fadab Fix package declaration for play-framework

  • 2c6380c84 fix inner item (list, map) for play framework

  • e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item.

  • 99fc27246 [JAX-RS][Spec] Removes throws Exception.

  • fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored).

  • d890d733f [JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88)

  • c91ce17ae Feature/javaPlayWithAsynchronousControllers

  • f00a1ef52 [JAVA] Correct consumes/produces attributes for Spring Controllers

  • d14318cf2 [JAVA][Spring] Optional params with delegate

  • 3f81378d7 [java resteasy] fix string comparison (#134)

  • 5ea3d3bb1 [JAX-RS][SPEC] Bug fix that prevents generating interfaces when interfaceOnly is false.

  • Kotlin

  • 7cad47dd3 [kotlin-server] --library=ktor (barebones implementation)

  • 752b36e66 [Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77)

  • NodeJS

  • 6d88d073c [NodeJS] make serverPort configurable via CLI option

  • e7f4fb3c4 Fix nodejs-server path issue in windows platform

  • PHP

  • d30fcbabb Fixes for php-ze-ph generator

  • 60e3339aa [Feature][PHP] Update for ze-ph generator

  • Python

  • 62b93fc5c [Python][Flask] Handles UUID format -

  • 9999eac52 fix python flask parameter naming

  • Scala

  • d5c355a59 [Scalatra] Updated the version of Scalatra to the latest (2.6.2)

  • 52322c47c [finch] Allow finch server to compile for CI checks (#7)

  • Ruby

  • dcad9ae80 [Rails5] make version of the generated Rails stub server to strict Rails 5.0

  • Rust

  • 37faaf926 [rust-server] API version constant and composite version support

  • 6c7813e79 [rust-server] asynchronous support via hyper v0.11

  • Documentation

  • 25a6a9d44 html: fix typo in class name

  • Miscellaneous

  • f04213285 Cli error message improvements (#172)
  • 0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90)
  • 64f2bea37 Fix getReferenced...() methods in ModelUtils (#157)
  • 16ff5174e Update swagger-parser to 2.0.1 (#123)
  • 76b7307a6 DefaultGenerator: ignore only form param schemas (#74)
  • a3aabd390 Create a default implementation of delegate if none could be autowired (#92)
  • ca89af808 Switch to Java 8
  • 27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57)
  • a1ff50241 Rename datatype to dataType in CodegenProperty (#69)
  • 3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91)
  • 488910362 Set parameters allowableValues dynamically (#65)
  • 2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89)
  • 82d9e935e Add CORS configuration to openapi-generator-online (#71)
  • e3814f51d Improvements to online codegen (#55)
  • 6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45)
  • 7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54)
  • 8dd46a3fb Move online gen from jersey to spring boot (#44)
  • 803821e21 Fix an issue with example generator when array is too large (#46)
  • 673f2bc46 Add CodegenProperty.nameInSnakeCase (#42)
  • 67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38)
  • 10ac4024d Code clean-up: remove field declaration hiding existing fields (#35)
  • ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26)
  • 41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19)
  • 13f084e7b Fix dataTypeWithEnum for array of form parameters
  • fd3b883e8 [DefaultCodegen] Fill CodegenOperation::produces with unique media types
  • db9a899a0 update getSchemaType variable, remove unused import
  • d74b4cdf8 fix map type and collection format for form parameter (array)
  • d99f46cff Revise how to obtain the example value
  • b1eac05b2 Fix form datatype (array of string)
  • 3c666a6d4 Fix array of form parameters
  • 1492df6ce Override server port for Jetty configuration
  • 622a75b2c Fix data type shadowing
  • 861d11d01 use vendor extension in operation to set the body parameter name
  • 80c8b92cb add postProcessParameter for body, form parameter
  • 7fe555a51 Set collectionFormat default only for array
  • 16589de97 default collection format to csv according to the spec
  • edbe4902a Consider '$ref' for consumes and produces in CodegenOperation
  • e24238a35 Improve getter name handling for boolean properties
  • 6e2ca294b update discriminator to discriminatorName
  • 74075c087 Primitive datatype in Schema components
  • d8abd4a14 support map in body parameter
  • 186594115 Update swagger-core to 2.0.1
  • 2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface
  • d0e2d7684 Getter and Setter for hideGenerationTimestamp
  • adbde2fb6 replace fromOperation with postProcessOperations
  • 9d1ae0dd2 fix bigdecimal in default codegen
  • ffa0e115d fix default value and type declaration
  • 0e744adb8 Apply collection format to SIMPLE enum style
  • 36ed29852 Tweak tests according to the parameter order changes
  • 17b082793 Move 'enum_query_double' to parameters section
  • 28fcf48f4 Add a method returns discriminator name
  • 7daa2ec5d Fix broken discriminator
  • faa901640 Replace with the helper function: getTypeDeclaration
  • c8650d0e3 Make optional properties in models optional parameters
  • 40c30dd2f Fix inputSpec for multi module builds
  • 5326152cc add option to reorder form/body parameter
  • d1850091a Improve JMeter Template
  • fedfb0cda Factorize addOption/addSwitch method
  • e73eeb4fd fix for stripping prefix on single enums
  • 13e3db59e Add operationIdOriginal to store the original operationId
  • 0b2d80569 Expose getter/setter for serverPort to facilitate testing
  • 8e270f465 add vendorExtensions field in CodegenSecurity class
  • 1ee85de94 Added Intelli J ignore
  • 7b8e409cf Added gitignore generation function
Last updated on by Oleh Kurpiak
+

Release Notes: 3.0.0

  • Docker

  • 7dfd94002 Docker: use correct MAVEN_CONFIG (#182)

  • b5a0d173d Revise the usage of OpenAPI Generator online (docker image) (#73)

  • e58dc2c77 Fix COPY in Dockerfile (#64)

  • 9d7feaaeb Fix online generator (docker push) (#58)

  • 9247cd01e Changes for Docker

  • 64037ee59 update docker-related files to ues jdk8

  • Plug-ins

  • b6b8c0db8 [gradle-plugin] Initial implementation (#162)

  • 0a28aad73 [MAVEN PLUGIN] Checking for null configOptions before looking for property

  • 9c79297d6 [MAVEN PLUGIN] Use latest version in dependencies snippet

  • 9e1bbe0c1 Add maven wrapper

  • API Clients

  • Ada

  • edf6be8c0 [Ada] bug fix by defining x-is-model-type when property is local to the YML file

  • 9ba74f484 [Ada] Fix GNAT project and server skeleton to avoid sending a response when an error is returned

  • ea27924f5 [Ada] changed default project/package name, to solve circular dependencies

  • 6b9d38d40 remove trailing spaces in ada template

  • 0de7f972f Fix the Ada server skeleton to check the authsMethods in the Shared_Instance generic package

  • 4bd8fc6e8 Fix 7511: [Ada] Client call is not correct with multiple parameters and application/x-www-urlencoded

  • 3035bc629 [Ada] Hotfix/ada model sort

  • 43f0e8692 Ada code generator corrected: "=>" instead of "->".

  • 7d2b49085 [Ada] wrong order for generated structures in models.ads files

  • 2b2b85eec [Ada] wrong JSON in POST operations

  • C#

  • 0e34bcf4e [csharp] ctor params should always be camelCase

  • 872471996 [csharp] Support arrays of arrays for properties and models

  • 1c4e6b7d4 [csharp] Fix ToJson to work with composition and polymorphism

  • ed7af73f6 [csharp] Reference this.Configuration in client API template

  • C++

  • e796e4c36 [C++] Add linux as a reserve keyword

  • 36f69a034 remove trailing spaces in qt5 c++ templates

  • f192613f1 fix string type in c++ generator

  • 409015461 fix file type in qt5cpp

  • a4bcb3bc7 fix datetime and map type for qt5cpp

  • 23b31aba8 [qt5cpp] Fix crash when API return a map container

  • 3b031ed2b [qt5cpp] delete callback data allocated before signal emission

  • 1bb1e44d1 [qt5cpp] Remove qt5 pro.user file

  • 194722015 Qt5cpp plug memleaks part2

  • 12f3661d6 Qt5cpp plug memleaks

  • ea4b94842 [qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized

  • 0bf430a80 Qt5cpp Add support for nested containers

  • 0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema

  • 7c734445b fix file parameter in header file (cpprest)

  • 070b5c00b fix object type declaration in cpprest

  • bad1885b4 [cpprest] add parameterToString for number type with unspecified format (double)

  • 73bd24db7 [cpprest] Add support for nested vectors

  • ee2eb74f7 [qt] update Qt client

  • d82499944 Adding qt project generation fix

  • 9bd94b4db [qt] Fix warning message

  • Clojure

  • d7e374504 [Clojure] Add util method to set the api-context globally (#93)

  • Dart

  • f1638a659 [Dart] Allow setting an accessToken for OAuth

  • a5e26a44f [Dart] - Rework Dart client generator to be flutter-compatible

  • Elixir

  • f9b2839a3 [Elixir] Check date value before calling to_iso8601

  • Elm

  • 5a87fe695 [elm] Fix operations with empty responses (#171)

  • a5cf27b60 Fix Petstore example for Elm (#96)

  • c522927d5 Fix Elm generator for polymorphism (#78)

  • 7d9fb9f51 Add CI test for Elm in travis (#40)

  • 769a65c95 [Elm] Add support for array schemas

  • 56a0268e3 [elm] missing '->' in Main elm template

  • Erlang

  • c73118524 [erlang-client] Erlang request utils

  • 049eef9c5 Test erlang client, server petstore

  • bcc7b788e fix erlang client compilation error

  • Go

  • acb63fd5e Fix go readme, remove resty install

  • 5d8362d85 Update go client, fix double body read

  • 47614bb76 Properly capitalize exported go types

  • ee561fcd6 Add withXml option for Go language

  • 0f6696089 [Go] Use consistent indentation in readme

  • 72abb20f2 [Go] Fix operation files clobbering model files. [2.4.0]

  • Haskell

  • 34db79b9b [haskell-http-client] update dependency versions + readme (#81)

  • e45b3784f Fix NPE with Haskell client generator with OAS3 spec

  • d3401396f [haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue

  • 4bc99b9da minor fixes to haskell http client generator

  • 2d0bafb6b [haskell-http-client] default InlineMimeTypes=true

  • 9fba9c325 [haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType

  • Kotlin

  • a3322fbf7 [kotlin] Add OkHttpClient.Builder to ApiClient.

  • 3c5fb1d80 [kotlin] Add json annotation to each enum value.

  • 39fa375e3 [kotlin] Fix NPE for POST/PUT/PATCH with empty request models.

  • c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type

  • c69925b53 [Kotlin] Fix issues with threetenbp

  • a811a48c3 minor fix to kotlin client generator due to merge conflict

  • 914275fe7 [kotlin] support selection of datelibrary

  • a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template

  • Lua

  • dbe78e23e [Lua] Improve auto-generated test files

  • 6c79052ac Add auto-generated Lua spec files for APIs, models

  • 38a2c1dde [Lua] Fix Rockpec

  • a2410b210 Add auto-generated rockspec file to Lua API client

  • df10c725a Add lua test script, minor fix to Lua API files

  • Java

  • 2e69e6c03 build.gradle should not have commas

  • 1a4e5a4e5 Java client: Add constants for libraries (#163)

  • 7db0201a8 Fix NPEs in Java generator (#154)

  • 4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151)

  • 072ce070b resteasy: fix outer enum case (#139)

  • ccd002966 [Java] rest-assured: fix javadoc in templates

  • e7410d4c8 Allow $ in java var name

  • 03490e923 Fix Java binary mapping

  • 70b4b55fa Fix performance linting problem with maps in Java ApiClient template

  • cddcda0fe [Java][Jersey2] Make generated client code thread safe

  • 298ca8d35 use correct jackson date library when using Java 8

  • 53eeb0c04 [Java] fix connection leak on retrofit OAuth token renewal

  • 61c25e711 [Java] Fixes for retrofit

  • f02332755 [JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger.

  • 4eeb974cb [Java][google-api-client] Fix bug with empty POST request not sending content-type

  • d4543a99e [Java][retrofit2] file upload sets filename as baseName instead of a dynamic filename

  • 62a930223 [JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom…

  • fec0363f7 [Java] Add back byte array enhancement

  • 59ff4c198 [Java][library: vertx] Add default value and required parameter support to vertx server temp…

  • 3bd2da9a8 [Java] Fix build warnings

  • 429b96ae7 [JAVA] equals and hashCode for models with byte[] and binary strings

  • 495971c2c [Java] use html entities in javadoc of generated code (#106)

  • 82ee8656f [java] Enum in array of array (#66)

  • bf7e4e7df Java gson: add @SerializedName value as constant (#22)

  • 30c1448d7 Fix build.gradle for Java RESTEasy client

  • 642c0566d [Java] Use Rx2 Completable for Void Retrofit2 responses

  • 72221b1cf Adding @Deprecated to retrofit2 client interfaces.

  • 47111b324 [Java] fix gson deserialize format byte

  • 9e06f7063 [Java] Fix assignment of new object instance to variable

  • 006f084b5 [Java] Allow to set values with setApiPackage(..) and setModelPackage(..)

  • JavaScript/NodeJS

  • d80e29585 Fix JS test using baseName in default value (#5)

  • fe15f4690 fix toDefaultValueWithParam in JS

  • 90859575e Fixing variable name typo (instane -> instance)

  • Objective-C

  • 9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest

  • 5d1874028 add class as a keyword in objc generator

  • 1b8df5c20 Update ObjcClientCodegen.java

  • 246ed5754 restore objc reserved word: property

  • PHP

  • 3beeb4e77 [PHP] Not-required properties now shows as nullable (#129)

  • 37df59d6f [PHP] Adjust the names (script, sample folder, generator) to lang option (#159)

  • 4a5d16b23 [PHP] Fix string length validation

  • d58835e57 [PHP] Improve: Make validation strict

  • cf8d8d56f [PHP] Fix code example from README. Variable name was missing when using Basic auth.

  • 0adbf7e51 [PHP] Improve: update sample tests automatically

  • 32cf2f16f [PHP] Non required enum property

  • 3bcf0ff76 [PHP] Add path & file separator (/) to return the correct path when deserializing a file

  • 14e1e1980 [PHP] Improve validation on empty arrays

  • 809e1f4c9 [PHP] Cleanup tests

  • 76907cacd [PHP] declare property headerSelector

  • Python

  • 7184f1ec6 [python] asyncio supports _preload_content; remove unused imports (#107)

  • d74d2ba03 fix: python clients

  • 8e0a0ebd6 Fix python / tornado body handling

  • b39c35c76 Fix inconsistency between model name and file name in python client

  • dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client

  • f6e0e297e [python-asyncio] tests and fixes

  • R

  • 61e58d649 Add R namespace file

  • Ruby

  • a08164592 fix ruby parameters in documentation, fix requiredParams, optionalParams

  • 8e34f9a98 update to newer version of ruby

  • aa6b217bb [Ruby] Add auto-generated rubocop config file

  • Rust

  • b44357394 [Rust] Implement minimal auth support

  • 0b845a57e [Rust] Changes hard coded body to dynamic parameter name -

  • a3c97753f [Rust] Handles UUID as string

  • 027df610b [Rust] Handle error response statuses

  • 66be7a791 [Rust] Add user agent handling for rust template (master)

  • 3029b7b0f [Rust] Format example with rustfmt

  • Scala

  • 197b4481e normalize akka-scala and Java README

  • 612cfb7af [Akka-scala] Clean unused dependencies such swagger-core

  • 86697fedb [Scala][Gatling] correct body params filename

  • 832919b84 [Scala][Akka] Remove unused dep when model package is empty

  • Swift

  • 40d5d0990 [Swift4] accept empty content with default client

  • 3b7230b17 [Swift 4] Fix APIHelper to accept array parameter

  • e22faf4cd [Swift] Add public initializer for modelObject.

  • b184fb1d9 [Swift3] escape URL parameters

  • 52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test

  • a3d0f1d4b Swift4: make generated models structs instead of classes

  • TypeScript

  • f615d823f update ts node dependencies

  • 9ac9bc0dc [TypeScript] enhance ts import

  • 009dcf009 Mark not required swagger properties as optional typescript properties

  • bdd2c2a4e Misc typescript Angular code generation improvements

  • 260375c9e Fix typescript-node generation of array type models

  • d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param

  • 20305139b [Feature][TypeScript] request param enum as literal unions

  • 524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular

  • 9b8602311 [TypeScript] Make OpenAPI Generator serialize subclasses properly (#102)

  • 4bc5ffe86 [typescript-angular] add provided in support (#120)

  • ef832e715 [Feature][TS Angular] improve docs angular import

  • fc7e08346 [TS][Fetch] Add interfaces option

  • 157e6b7fa [angular] Add option to generate tagged unions

  • 7faaa091c Fix generated module imports in Aurelia APIs

  • b5f0b24ba [TS] fix object declaration in model

  • API Servers

  • C++

  • 6fef0a7ff fix string issue with restbed generator

  • a339422bd move get type declaration method to c++ restbed

  • C#

  • d9d653016 [aspnetcore] Make the use of Swashbuckle optional (#110)

  • 9a8183ab0 [aspnetcore] Fix openapi.json location rename (#56)

  • 12abfb968 [aspnetcore] Update Dockerfile

  • 866817587 [aspnetcore] Fix string enum generation

  • Java

  • bd50d368e [JAVA - jaxrs-resteasy-eap] Add import to models (#179)

  • 7efda597c Fix issue with useBeanValidation option in Java server generators (#160)

  • 71b5de3ed Do not set contextPath for spring-boot (#104)

  • b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131)

  • 4d7fc046f [JaxRS] Add "validation-api" dependency in jetty (#30)

  • ce930e7a6 [Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)

  • 386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client"

  • 5d92717dc update jaxrs to listen at port 10080

  • 7c2031675 update artifact id for jaxrs datelib j8

  • 88c5112f2 Adds support for returning response in jaxrs-spec interfaces

  • 6bf84d5fa [JAXRS-SPEC] Fix lowercase enums sent as uppercase

  • 3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85)

  • 161948657 Add reactive option for Spring Boot (webflux)

  • ff1178ad7 [Java][Spring] fix missing optional query params

  • 2103fadab Fix package declaration for play-framework

  • 2c6380c84 fix inner item (list, map) for play framework

  • e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item.

  • 99fc27246 [JAX-RS][Spec] Removes throws Exception.

  • fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored).

  • d890d733f [JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88)

  • c91ce17ae Feature/javaPlayWithAsynchronousControllers

  • f00a1ef52 [JAVA] Correct consumes/produces attributes for Spring Controllers

  • d14318cf2 [JAVA][Spring] Optional params with delegate

  • 3f81378d7 [java resteasy] fix string comparison (#134)

  • 5ea3d3bb1 [JAX-RS][SPEC] Bug fix that prevents generating interfaces when interfaceOnly is false.

  • Kotlin

  • 7cad47dd3 [kotlin-server] --library=ktor (barebones implementation)

  • 752b36e66 [Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77)

  • NodeJS

  • 6d88d073c [NodeJS] make serverPort configurable via CLI option

  • e7f4fb3c4 Fix nodejs-server path issue in windows platform

  • PHP

  • d30fcbabb Fixes for php-ze-ph generator

  • 60e3339aa [Feature][PHP] Update for ze-ph generator

  • Python

  • 62b93fc5c [Python][Flask] Handles UUID format -

  • 9999eac52 fix python flask parameter naming

  • Scala

  • d5c355a59 [Scalatra] Updated the version of Scalatra to the latest (2.6.2)

  • 52322c47c [finch] Allow finch server to compile for CI checks (#7)

  • Ruby

  • dcad9ae80 [Rails5] make version of the generated Rails stub server to strict Rails 5.0

  • Rust

  • 37faaf926 [rust-server] API version constant and composite version support

  • 6c7813e79 [rust-server] asynchronous support via hyper v0.11

  • Documentation

  • 25a6a9d44 html: fix typo in class name

  • Miscellaneous

  • f04213285 Cli error message improvements (#172)
  • 0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90)
  • 64f2bea37 Fix getReferenced...() methods in ModelUtils (#157)
  • 16ff5174e Update swagger-parser to 2.0.1 (#123)
  • 76b7307a6 DefaultGenerator: ignore only form param schemas (#74)
  • a3aabd390 Create a default implementation of delegate if none could be autowired (#92)
  • ca89af808 Switch to Java 8
  • 27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57)
  • a1ff50241 Rename datatype to dataType in CodegenProperty (#69)
  • 3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91)
  • 488910362 Set parameters allowableValues dynamically (#65)
  • 2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89)
  • 82d9e935e Add CORS configuration to openapi-generator-online (#71)
  • e3814f51d Improvements to online codegen (#55)
  • 6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45)
  • 7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54)
  • 8dd46a3fb Move online gen from jersey to spring boot (#44)
  • 803821e21 Fix an issue with example generator when array is too large (#46)
  • 673f2bc46 Add CodegenProperty.nameInSnakeCase (#42)
  • 67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38)
  • 10ac4024d Code clean-up: remove field declaration hiding existing fields (#35)
  • ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26)
  • 41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19)
  • 13f084e7b Fix dataTypeWithEnum for array of form parameters
  • fd3b883e8 [DefaultCodegen] Fill CodegenOperation::produces with unique media types
  • db9a899a0 update getSchemaType variable, remove unused import
  • d74b4cdf8 fix map type and collection format for form parameter (array)
  • d99f46cff Revise how to obtain the example value
  • b1eac05b2 Fix form datatype (array of string)
  • 3c666a6d4 Fix array of form parameters
  • 1492df6ce Override server port for Jetty configuration
  • 622a75b2c Fix data type shadowing
  • 861d11d01 use vendor extension in operation to set the body parameter name
  • 80c8b92cb add postProcessParameter for body, form parameter
  • 7fe555a51 Set collectionFormat default only for array
  • 16589de97 default collection format to csv according to the spec
  • edbe4902a Consider '$ref' for consumes and produces in CodegenOperation
  • e24238a35 Improve getter name handling for boolean properties
  • 6e2ca294b update discriminator to discriminatorName
  • 74075c087 Primitive datatype in Schema components
  • d8abd4a14 support map in body parameter
  • 186594115 Update swagger-core to 2.0.1
  • 2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface
  • d0e2d7684 Getter and Setter for hideGenerationTimestamp
  • adbde2fb6 replace fromOperation with postProcessOperations
  • 9d1ae0dd2 fix bigdecimal in default codegen
  • ffa0e115d fix default value and type declaration
  • 0e744adb8 Apply collection format to SIMPLE enum style
  • 36ed29852 Tweak tests according to the parameter order changes
  • 17b082793 Move 'enum_query_double' to parameters section
  • 28fcf48f4 Add a method returns discriminator name
  • 7daa2ec5d Fix broken discriminator
  • faa901640 Replace with the helper function: getTypeDeclaration
  • c8650d0e3 Make optional properties in models optional parameters
  • 40c30dd2f Fix inputSpec for multi module builds
  • 5326152cc add option to reorder form/body parameter
  • d1850091a Improve JMeter Template
  • fedfb0cda Factorize addOption/addSwitch method
  • e73eeb4fd fix for stripping prefix on single enums
  • 13e3db59e Add operationIdOriginal to store the original operationId
  • 0b2d80569 Expose getter/setter for serverPort to facilitate testing
  • 8e270f465 add vendorExtensions field in CodegenSecurity class
  • 1ee85de94 Added Intelli J ignore
  • 7b8e409cf Added gitignore generation function
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/release-summary/index.html b/docs/release-summary/index.html index 9538eeb3cb6..1662baa3e73 100644 --- a/docs/release-summary/index.html +++ b/docs/release-summary/index.html @@ -27,14 +27,14 @@
-

Release Summary

Versioning

We version artifacts in the common major.minor.patch strategy.

We decided versions should be incremented according to the following rules. The examples provided below are not exhaustive.

PartBreaking Changes?RuleExamples
majorYESbreaking changes without fallback
  • New Features
  • Large refactors
  • Removal of deprecated code
  • Changes to coding interfaces
  • Large changes to template bound variables
minorALLOWEDbreaking changes with fallback
  • Adding new generator behavior which doesn't affect custom templates (or does, with config option for old behavior)
  • Changing generator templates in a way in which switching to custom templates results in old behavior
  • Introducing deprecated methods in generators or other shared code
patchNOnew features without breaking changes
  • New generators
  • Bug fixes in template or generators

Cadence

For patch release (e.g. 3.0.5 to 3.0.6), we plan to do it on a weekly basis.

For minor release (e.g. 3.1.6 to 3.2.0), we plan to do it on a monthly basis.

For major releases (e.g. 3.3.6 to 4.0.0), we plan to do it on a quarterly basis.

Last updated on by Oleh Kurpiak
+

Release Summary

Versioning

We version artifacts in the common major.minor.patch strategy.

We decided versions should be incremented according to the following rules. The examples provided below are not exhaustive.

PartBreaking Changes?RuleExamples
majorYESbreaking changes without fallback
  • New Features
  • Large refactors
  • Removal of deprecated code
  • Changes to coding interfaces
  • Large changes to template bound variables
minorALLOWEDbreaking changes with fallback
  • Adding new generator behavior which doesn't affect custom templates (or does, with config option for old behavior)
  • Changing generator templates in a way in which switching to custom templates results in old behavior
  • Introducing deprecated methods in generators or other shared code
patchNOnew features without breaking changes
  • New generators
  • Bug fixes in template or generators

Cadence

For patch release (e.g. 3.0.5 to 3.0.6), we plan to do it on a weekly basis.

For minor release (e.g. 3.1.6 to 3.2.0), we plan to do it on a monthly basis.

For major releases (e.g. 3.3.6 to 4.0.0), we plan to do it on a quarterly basis.

Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/roadmap/index.html b/docs/roadmap/index.html index abf0790c5b8..a3de0e5db78 100644 --- a/docs/roadmap/index.html +++ b/docs/roadmap/index.html @@ -27,14 +27,14 @@
-

Roadmap

This document lists short-term, medium-term, and long-term goals for the project.


NOTE

These are goals, not necessarily commitments. The sections are not intended to represent exclusive focus during these terms. For example, when you start at a college or university you may have a long-term goal to graduate and a short-term goal to find a job for supplemental income. We will similarly work toward many of our medium-term and long-term goals in the near future as we move toward meeting our short-term goals.


Short-term

Usability, stability, and marketing.

Short term are focused on improving contributor and user productivity (part of this is getting the word out).

  • CLI improvements
    • Search functionality (e.g. what generators support retrofit, what generators are available for kotlin)
  • Build automation improvements
  • Discuss consolidating current third-party build systems
  • Investigate custom docker containerization for prepared build environments
  • Automated release stability
  • General
  • OAS3.0 features support: anyOf, oneOf, callbacks, etc
  • Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name). This would allow us to make prioritization decisions based on statistics.
  • Code clean up
  • Documentation
  • Static pages, preferably on gh-pages, devoted to each generator
  • Explain generator options
  • Centralized docs on generated code usage/examples/configuration

Medium-term

Feature set, well-defined API (code and templates), and extensibility improvements.

API

  • Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
  • Feature set (potential generators to add; not an exhaustive list)
    • Azure functions (node.js, server)
    • Finagle HTTP Client (Scala, client)
    • Finagle Http Server (Scala, server)
    • Finatra (Scala, server)
    • Kotlin Spring MVC/Springboot (server)
    • C++ Server, any framework (server)

General

  • Migrate from Maven to Gradle
  • Java 9+ support
  • Feature set (other options to investigate)
  • SPI plugins
    • Templating engine
    • Language extensions
    • Custom extensions (e.g. allowing users to load support for azure-rest-api-specs)
  • Customizable templating engines (handlebars support)
  • Unit-testing templates (to previously mentioned explicit type as an interface to the template)
  • Reduce coupling
  • Make types extending CodegenConfig become the generation entrypoint
  • Allow current CodegenConfig types to define templating engine
  • Allow current CodegenConfig types to modify workflow (currently encapsulated in DefaultGenerator and tightly coupled to the template engine
  • Clearer reuse of "language" features, outside of "generator" types. That is, rather than enforcing polymorphic sharing of "language" which currently allows the super type to redefine framework-specific mapping functionality, generators could compose one or more language support types.
  • Define template deprecation/removal process

Long-term

Expanding tooling offered, integrations, potentially SaaS offering to partially fund efforts.

  • Generator UI wrappers
    • Move jimschubert/intellij-swagger-codegen plugin under the org, and rename
    • Look into an Eclipse UI wrapper around the generator
    • Look at Visual Studio Code (and/or Atom, sublime text) integration
  • Provide a native GUI for viewing/editing specs. Most tools are currently geared toward developers, but often times it may be non-technical business users who are interested in an API.
  • A paid service (SaaS) for generation may be enticing for some users. Such a service would allow for statistics (mentioned earlier in telemetry)
  • Additional tools
  • node.js build system(s) integration (grunt/gulp/webpack/etc)
  • ruby gem
  • others (which may require previously mentioned SaaS API)
Last updated on by Oleh Kurpiak
+

Roadmap

This document lists short-term, medium-term, and long-term goals for the project.


NOTE

These are goals, not necessarily commitments. The sections are not intended to represent exclusive focus during these terms. For example, when you start at a college or university you may have a long-term goal to graduate and a short-term goal to find a job for supplemental income. We will similarly work toward many of our medium-term and long-term goals in the near future as we move toward meeting our short-term goals.


Short-term

Usability, stability, and marketing.

Short term are focused on improving contributor and user productivity (part of this is getting the word out).

  • CLI improvements
    • Search functionality (e.g. what generators support retrofit, what generators are available for kotlin)
  • Build automation improvements
  • Discuss consolidating current third-party build systems
  • Investigate custom docker containerization for prepared build environments
  • Automated release stability
  • General
  • OAS3.0 features support: anyOf, oneOf, callbacks, etc
  • Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name). This would allow us to make prioritization decisions based on statistics.
  • Code clean up
  • Documentation
  • Static pages, preferably on gh-pages, devoted to each generator
  • Explain generator options
  • Centralized docs on generated code usage/examples/configuration

Medium-term

Feature set, well-defined API (code and templates), and extensibility improvements.

API

  • Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
  • Feature set (potential generators to add; not an exhaustive list)
    • Azure functions (node.js, server)
    • Finagle HTTP Client (Scala, client)
    • Finagle Http Server (Scala, server)
    • Finatra (Scala, server)
    • Kotlin Spring MVC/Springboot (server)
    • C++ Server, any framework (server)

General

  • Migrate from Maven to Gradle
  • Java 9+ support
  • Feature set (other options to investigate)
  • SPI plugins
    • Templating engine
    • Language extensions
    • Custom extensions (e.g. allowing users to load support for azure-rest-api-specs)
  • Customizable templating engines (handlebars support)
  • Unit-testing templates (to previously mentioned explicit type as an interface to the template)
  • Reduce coupling
  • Make types extending CodegenConfig become the generation entrypoint
  • Allow current CodegenConfig types to define templating engine
  • Allow current CodegenConfig types to modify workflow (currently encapsulated in DefaultGenerator and tightly coupled to the template engine
  • Clearer reuse of "language" features, outside of "generator" types. That is, rather than enforcing polymorphic sharing of "language" which currently allows the super type to redefine framework-specific mapping functionality, generators could compose one or more language support types.
  • Define template deprecation/removal process

Long-term

Expanding tooling offered, integrations, potentially SaaS offering to partially fund efforts.

  • Generator UI wrappers
    • Move jimschubert/intellij-swagger-codegen plugin under the org, and rename
    • Look into an Eclipse UI wrapper around the generator
    • Look at Visual Studio Code (and/or Atom, sublime text) integration
  • Provide a native GUI for viewing/editing specs. Most tools are currently geared toward developers, but often times it may be non-technical business users who are interested in an API.
  • A paid service (SaaS) for generation may be enticing for some users. Such a service would allow for statistics (mentioned earlier in telemetry)
  • Additional tools
  • node.js build system(s) integration (grunt/gulp/webpack/etc)
  • ruby gem
  • others (which may require previously mentioned SaaS API)
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/spec-info/index.html b/docs/spec-info/index.html index d74ff59c394..2b6439e4895 100644 --- a/docs/spec-info/index.html +++ b/docs/spec-info/index.html @@ -27,14 +27,14 @@
-
Last updated on by Oleh Kurpiak
+
Last updated on by William Cheng
- + - + @@ -48,7 +48,7 @@ - + diff --git a/docs/swagger-codegen-migration/index.html b/docs/swagger-codegen-migration/index.html index 842ec2732b8..f662054c268 100644 --- a/docs/swagger-codegen-migration/index.html +++ b/docs/swagger-codegen-migration/index.html @@ -38,14 +38,14 @@ The syntax inside the file stays the same.

You don't need to rename t (When there is no .openapi-generator-ignore in a folder, if a .swagger-codegen-ignore file is present it will be considered and renamed to .openapi-generator-ignore).

Metadata folder

The metadata folder (to store the VERSION file for example) is now called .openapi-generator/ instead of .swagger-codegen/.

New default values for the generated code

If you use a generator without specifying each parameter, you might see some differences in the generated code. As example the default package name used in the generated code has changed. You need to have a look at the specific value, depending of your target language, but often Swagger îs replaced by OpenAPITools and io.swagger is replaced by org.openapitools. -Concretely if you did not specify anything when you are generating java code, a file org/openapitools/api/PetApi.java might be generated instead of io/swagger/api/PetApi.java.

If this is a problem for you, you need to explicitly set the the parameter value in order to match with the swagger-codgen default value (apiPackage == io.swagger in the previous example with the java generator).

New fully qualified name for the classes

If you have extended some generators in your project, and you are looking for a specific class, replace the io.swagger.codegen package (old name) with org.openapitools.codegen package (new name).

Example: org.openapitools.codegen.DefaultGenerator

Body parameter name

‼️ Since 4.0.0-beta, the body parameter name in OAS v2 is automatically preserved in the vendor extension x-codegen-request-body-name

In OpenAPI spec v3, there's no body parameter, which is replaced by Request Body Object. The parameter name for Request Body is named automatically based on the model name (e.g. User). To control how the "Request Body" parameter is named, please add the vendor extension x-codegen-request-body-name to the operation:

OpenAPI Spec v3:

paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
x-codegen-request-body-name: new_body_name
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
$ref: '#/components/requestBodies/Pet'

OpenAPI Spec v2:

paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
x-codegen-request-body-name: new_body_name
consumes:
- application/json
- application/xml
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/Pet'
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'

If your API client is using named parameters in the function call (e.g. Perl required & optional parameters, Ruby optional parameters), you will need to add x-codegen-request-body-name to the spec to restore the original body parameter name.

Default basePath

The default basePath has been changed from https://localhost to http://localhost (http without s)

Nullable

OpenAPI spec v3 has better support for nullable. If you're still using OpenAPI/Swagger spec v2, please use x-nullable: true instead.

Last updated on by Oleh Kurpiak
+Concretely if you did not specify anything when you are generating java code, a file org/openapitools/api/PetApi.java might be generated instead of io/swagger/api/PetApi.java.

If this is a problem for you, you need to explicitly set the the parameter value in order to match with the swagger-codgen default value (apiPackage == io.swagger in the previous example with the java generator).

New fully qualified name for the classes

If you have extended some generators in your project, and you are looking for a specific class, replace the io.swagger.codegen package (old name) with org.openapitools.codegen package (new name).

Example: org.openapitools.codegen.DefaultGenerator

Body parameter name

‼️ Since 4.0.0-beta, the body parameter name in OAS v2 is automatically preserved in the vendor extension x-codegen-request-body-name

In OpenAPI spec v3, there's no body parameter, which is replaced by Request Body Object. The parameter name for Request Body is named automatically based on the model name (e.g. User). To control how the "Request Body" parameter is named, please add the vendor extension x-codegen-request-body-name to the operation:

OpenAPI Spec v3:

paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
x-codegen-request-body-name: new_body_name
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
$ref: '#/components/requestBodies/Pet'

OpenAPI Spec v2:

paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
x-codegen-request-body-name: new_body_name
consumes:
- application/json
- application/xml
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/Pet'
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'

If your API client is using named parameters in the function call (e.g. Perl required & optional parameters, Ruby optional parameters), you will need to add x-codegen-request-body-name to the spec to restore the original body parameter name.

Default basePath

The default basePath has been changed from https://localhost to http://localhost (http without s)

Nullable

OpenAPI spec v3 has better support for nullable. If you're still using OpenAPI/Swagger spec v2, please use x-nullable: true instead.

Last updated on by William Cheng
- + - + @@ -59,7 +59,7 @@ Concretely if you did not specify anything when you are generating java code, a - + diff --git a/docs/templating/index.html b/docs/templating/index.html index 149dd589f45..03d5453c77f 100644 --- a/docs/templating/index.html +++ b/docs/templating/index.html @@ -32,14 +32,14 @@ You'll see them referred to as "Vendor Extensions" in most places This is used to define names of the enum items.

x-enum-descriptions can be used to provide an individual description for each value. This is used for comments in the code (like javadoc if the target language is java).

x-enum-descriptions and x-enum-varnames are each expected to be list of items containing the same number of items as enum. The order of the items in the list matters: their position is used to group them together.

Example:

WeatherType:
type: integer
format: int32
enum:
- 42
- 18
- 56
x-enum-descriptions:
- 'Blue sky'
- 'Slightly overcast'
- 'Take an umbrella with you'
x-enum-varnames:
- Sunny
- Cloudy
- Rainy

In the example for the integer value 42, the description will be Blue sky and the name of the enum item will be Sunny (some generators changes it to SUNNY to respect some coding convention).

ObjC

x-objc-operationId

To customize the method name, you can provide a different name in x-objc-operationId, e.g.

summary: Add a new pet to the store
description: ''
operationId: addPet
x-objc-operationId: CreateNewPet

Java (Feign)

x-accepts

A single Accepts value as the Feign API client needs a single value for Accepts header, e.g.

consumes:
- application/json
- application/xml
x-accepts: application/json

x-content-type

A single "Content-Type" value as the Feign API client needs a single value for Content-Type header, e.g.

produces:
- application/xml
- application/json
x-content-type: application/json

Rust-server

x-response-id

Each response may specify a unique x-response-id. rust-server will use this to name the corresponding enum variant in the code. e.g.

paths:
/ping:
get:
responses:
200:
description: OK
x-response-id: Pong

MySQL Schema

x-mysqlSchema

MySQL schema generator creates vendor extensions based on openapi dataType and dataFormat. When user defined extensions with same key already exists codegen accepts those as is. It means it won't validate properties or correct it for you. Every model in definitions can contain table related and column related extensions like in example below:

definitions:
Order:
description: This should be most common InnoDB table
type: object
properties:
id:
description: >-
This column should be unsigned BIGINT with AUTO_INCREMENT
type: integer
format: int64
x-mysqlSchema:
columnDefinition:
colName: id
colDataType: DECIMAL
colDataTypeArguments:
- argumentValue: 16
isString: false
- argumentValue: 4
isString: false
colUnsigned: true
colNotNull: true
colDefault:
defaultValue: AUTO_INCREMENT
isString: false
isNumeric: false
isKeyword: true
colComment: >-
Column comment. This column should be unsigned BIGINT with AUTO_INCREMENT
x-mysqlSchema:
tableDefinition:
tblName: orders
tblStorageEngine: InnoDB
tblComment: >-
Table comment. This should be most common InnoDB table

There are properties that are not implemented by now(tblStorageEngine), but you can see how generator can be enhanced in future.

Mustache Tips

Here are a few tips we've found useful for new template authors. -For more details on Mustache see mustache.5. See also samskivert/jmustache for implementation-specific details.

First/Last

To access the first or last element in a list using Mustache:

{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}
{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}

This

Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept).

You can inspect this entire context by outputting {{this}}. For example:

{{#operations}}{{this}}{{/operations}}

Index

If you'd like a 1-based index in your array traversal, you can use {{-index}}:

{{#enums}}{{-index}} {{enum}}{{/enums}}
Last updated on by Oleh Kurpiak
+For more details on Mustache see mustache.5. See also samskivert/jmustache for implementation-specific details.

First/Last

To access the first or last element in a list using Mustache:

{{#vars}}{{#-first}} this is the first element {{.}} {{/-first}}{{/vars}}
{{#vars}}{{#-last}} this is the last element {{.}} {{/-last}}{{/vars}}

This

Mustache evaluates template variables contextually. If the variable isn't found in the immediate object, mustache will search the parent. This is similar to JavaScript's prototype object (if you're familiar with the concept).

You can inspect this entire context by outputting {{this}}. For example:

{{#operations}}{{this}}{{/operations}}

Index

If you'd like a 1-based index in your array traversal, you can use {{-index}}:

{{#enums}}{{-index}} {{enum}}{{/enums}}
Last updated on by William Cheng
- + - + @@ -53,7 +53,7 @@ For more details on Mustache see - + diff --git a/docs/usage/index.html b/docs/usage/index.html index 3f94b8525f5..1d7644d252e 100644 --- a/docs/usage/index.html +++ b/docs/usage/index.html @@ -35,9 +35,9 @@ modified by --includes-base-dir. Starting with 5.0.0, the !ba - + - + diff --git a/e360e27f.5e1b6c4e.js b/e360e27f.5e1b6c4e.js new file mode 100644 index 00000000000..f2443a0c6fc --- /dev/null +++ b/e360e27f.5e1b6c4e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[162],{286:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return l})),t.d(n,"metadata",(function(){return i})),t.d(n,"rightToc",(function(){return p})),t.d(n,"default",(function(){return s}));var a=t(1),r=t(9),o=(t(0),t(312)),l={id:"plugins",title:"Plugins"},i={id:"plugins",title:"Plugins",description:"## Maven",source:"@site/../docs/plugins.md",permalink:"/docs/plugins",editUrl:"https://github.com/OpenAPITools/openapi-generator/edit/master/website/../docs/plugins.md",lastUpdatedBy:"William Cheng",lastUpdatedAt:1650157931,sidebar:"docs",previous:{title:"CLI Installation",permalink:"/docs/installation"},next:{title:"Online",permalink:"/docs/online"}},p=[{value:"Maven",id:"maven",children:[{value:"Example",id:"example",children:[]},{value:"Dependencies",id:"dependencies",children:[]}]},{value:"Gradle",id:"gradle",children:[{value:"Example",id:"example-1",children:[]}]}],c={rightToc:p};function s(e){var n=e.components,t=Object(r.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},c,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("h2",{id:"maven"},"Maven"),Object(o.b)("p",null,"A Maven plugin to support the OpenAPI generator project"),Object(o.b)("h3",{id:"example"},"Example"),Object(o.b)("p",null,"Add to your ",Object(o.b)("inlineCode",{parentName:"p"},"build->plugins")," section (default phase is ",Object(o.b)("inlineCode",{parentName:"p"},"generate-sources")," phase)"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-maven-plugin\n \x3c!-- RELEASE_VERSION --\x3e\n 5.1.0\n \x3c!-- /RELEASE_VERSION --\x3e\n \n \n \n generate\n \n \n ${project.basedir}/src/main/resources/api.yaml\n java\n \n src/gen/java/main\n \n \n \n \n\n")),Object(o.b)("p",null,"Followed by:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"mvn clean compile\n")),Object(o.b)("p",null,"For full details of all options, see the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin"}),"plugin README"),"."),Object(o.b)("h3",{id:"dependencies"},"Dependencies"),Object(o.b)("p",null,"The generated models use commonly used Swagger v2 annotations like ",Object(o.b)("inlineCode",{parentName:"p"},"@ApiModelProperty"),". A user may add Swagger v3 annotations:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger.core.v3\n swagger-annotations\n\n")),Object(o.b)("p",null,"But this will not work. This dependency is not binary compatible with Swagger v2 annotations. The resulting code will fail to compile."),Object(o.b)("p",null,"As alternative instead use the following dependency:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger.parser.v3\n swagger-parser\n\n")),Object(o.b)("h2",{id:"gradle"},"Gradle"),Object(o.b)("p",null,"This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options you\u2019d pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you\u2019re interested in the extension/task mapping concept from a high-level, you can check out ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.gradle.org/current/userguide/custom_plugins.html#sec:mapping_extension_properties_to_task_properties"}),"Gradle\u2019s docs"),"."),Object(o.b)("p",null,"To include in your project, add the following to ",Object(o.b)("inlineCode",{parentName:"p"},"build.gradle"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),'buildscript {\n repositories {\n mavenLocal()\n maven { url "https://repo1.maven.org/maven2" }\n }\n dependencies {\n classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.0"\n }\n}\n\napply plugin: \'org.openapi.generator\'\n')),Object(o.b)("p",null,"This gives access to the following tasks:"),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Task"),Object(o.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Description"))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiGenerate"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiGenerators"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Lists generators available via Open API Generators.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiMeta"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Generates a new generator to be consumed via Open API Generator.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiValidate"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Validates an Open API 2.0 or 3.x specification document.")))),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"The plugin implements the above tasks as project extensions of the same name. If you\u2019d like to declare these tasks as dependencies to other tasks (using ",Object(o.b)("inlineCode",{parentName:"p"},"dependsOn"),"), you\u2019ll need a task reference. e.g.:"),Object(o.b)("pre",{parentName:"blockquote"},Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),"compileJava.dependsOn tasks.openApiGenerate\n"))),Object(o.b)("p",null,"For full details of all options, see the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin"}),"plugin README"),"."),Object(o.b)("h3",{id:"example-1"},"Example"),Object(o.b)("p",null,"An example task for generating a kotlin client:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),'openApiGenerate {\n generatorName = "kotlin"\n inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()\n outputDir = "$buildDir/generated".toString()\n apiPackage = "org.openapi.example.api"\n invokerPackage = "org.openapi.example.invoker"\n modelPackage = "org.openapi.example.model"\n configOptions = [\n dateLibrary: "java8"\n ]\n}\n')))}s.isMDXComponent=!0},312:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return g}));var a=t(0),r=t.n(a);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=r.a.createContext({}),s=function(e){var n=r.a.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i({},n,{},e)),t},b=function(e){var n=s(e.components);return r.a.createElement(c.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},d=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),b=s(t),d=a,g=b["".concat(l,".").concat(d)]||b[d]||u[d]||o;return t?r.a.createElement(g,i({ref:n},c,{components:t})):r.a.createElement(g,i({ref:n},c))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=d;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var c=2;cplugins")," section (default phase is ",Object(o.b)("inlineCode",{parentName:"p"},"generate-sources")," phase)"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n org.openapitools\n openapi-generator-maven-plugin\n \x3c!-- RELEASE_VERSION --\x3e\n 5.1.0\n \x3c!-- /RELEASE_VERSION --\x3e\n \n \n \n generate\n \n \n ${project.basedir}/src/main/resources/api.yaml\n java\n \n src/gen/java/main\n \n \n \n \n\n")),Object(o.b)("p",null,"Followed by:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"mvn clean compile\n")),Object(o.b)("p",null,"For full details of all options, see the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin"}),"plugin README"),"."),Object(o.b)("h3",{id:"dependencies"},"Dependencies"),Object(o.b)("p",null,"The generated models use commonly used Swagger v2 annotations like ",Object(o.b)("inlineCode",{parentName:"p"},"@ApiModelProperty"),". A user may add Swagger v3 annotations:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger.core.v3\n swagger-annotations\n\n")),Object(o.b)("p",null,"But this will not work. This dependency is not binary compatible with Swagger v2 annotations. The resulting code will fail to compile."),Object(o.b)("p",null,"As alternative instead use the following dependency:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-xml"}),"\n io.swagger.parser.v3\n swagger-parser\n\n")),Object(o.b)("h2",{id:"gradle"},"Gradle"),Object(o.b)("p",null,"This gradle plugin offers a declarative DSL via extensions (these are Gradle project extensions). These map almost fully 1:1 with the options you\u2019d pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you\u2019re interested in the extension/task mapping concept from a high-level, you can check out ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://docs.gradle.org/current/userguide/custom_plugins.html#sec:mapping_extension_properties_to_task_properties"}),"Gradle\u2019s docs"),"."),Object(o.b)("p",null,"To include in your project, add the following to ",Object(o.b)("inlineCode",{parentName:"p"},"build.gradle"),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),'buildscript {\n repositories {\n mavenLocal()\n maven { url "https://repo1.maven.org/maven2" }\n }\n dependencies {\n classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.0"\n }\n}\n\napply plugin: \'org.openapi.generator\'\n')),Object(o.b)("p",null,"This gives access to the following tasks:"),Object(o.b)("table",null,Object(o.b)("thead",{parentName:"table"},Object(o.b)("tr",{parentName:"thead"},Object(o.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Task"),Object(o.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Description"))),Object(o.b)("tbody",{parentName:"table"},Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiGenerate"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiGenerators"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Lists generators available via Open API Generators.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiMeta"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Generates a new generator to be consumed via Open API Generator.")),Object(o.b)("tr",{parentName:"tbody"},Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"openApiValidate"),Object(o.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Validates an Open API 2.0 or 3.x specification document.")))),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"The plugin implements the above tasks as project extensions of the same name. If you\u2019d like to declare these tasks as dependencies to other tasks (using ",Object(o.b)("inlineCode",{parentName:"p"},"dependsOn"),"), you\u2019ll need a task reference. e.g.:"),Object(o.b)("pre",{parentName:"blockquote"},Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),"compileJava.dependsOn tasks.openApiGenerate\n"))),Object(o.b)("p",null,"For full details of all options, see the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin"}),"plugin README"),"."),Object(o.b)("h3",{id:"example-1"},"Example"),Object(o.b)("p",null,"An example task for generating a kotlin client:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),'openApiGenerate {\n generatorName = "kotlin"\n inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()\n outputDir = "$buildDir/generated".toString()\n apiPackage = "org.openapi.example.api"\n invokerPackage = "org.openapi.example.invoker"\n modelPackage = "org.openapi.example.model"\n configOptions = [\n dateLibrary: "java8"\n ]\n}\n')))}s.isMDXComponent=!0},312:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return g}));var a=t(0),r=t.n(a);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function p(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=r.a.createContext({}),s=function(e){var n=r.a.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):p({},n,{},e)),t},b=function(e){var n=s(e.components);return r.a.createElement(c.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.a.createElement(r.a.Fragment,{},n)}},d=Object(a.forwardRef)((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),b=s(t),d=a,g=b["".concat(l,".").concat(d)]||b[d]||u[d]||o;return t?r.a.createElement(g,p({ref:n},c,{components:t})):r.a.createElement(g,p({ref:n},c))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=d;var p={};for(var i in n)hasOwnProperty.call(n,i)&&(p[i]=n[i]);p.originalType=e,p.mdxType="string"==typeof e?e:a,l[1]=p;for(var c=2;c=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=i.a.createContext({}),b=function(e){var t=i.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s({},t,{},e)),a},p=function(e){var t=b(e.components);return i.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=b(a),m=n,h=p["".concat(r,".").concat(m)]||p[m]||u[m]||o;return a?i.a.createElement(h,s({ref:t},c,{components:a})):i.a.createElement(h,s({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,r[1]=s;for(var c=2;c=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=i.a.createContext({}),b=function(e){var t=i.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s({},t,{},e)),a},p=function(e){var t=b(e.components);return i.a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},m=Object(n.forwardRef)((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=b(a),m=n,h=p["".concat(r,".").concat(m)]||p[m]||u[m]||o;return a?i.a.createElement(h,s({ref:t},c,{components:a})):i.a.createElement(h,s({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,r=new Array(o);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,r[1]=s;for(var c=2;c" instead of "->". ')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7d2b49085 ","[","Ada] wrong order for generated structures in models.ads files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2b2b85eec ","[","Ada] wrong JSON in POST operations")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c"}),"C#")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0e34bcf4e ","[","csharp] ctor params should always be camelCase")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"872471996 ","[","csharp] Support arrays of arrays for properties and models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1c4e6b7d4 ","[","csharp] Fix ToJson to work with composition and polymorphism")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ed7af73f6 ","[","csharp] Reference this.Configuration in client API template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-1"}),"C++")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e796e4c36 ","[","C++] Add linux as a reserve keyword")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"36f69a034 remove trailing spaces in qt5 c++ templates")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f192613f1 fix string type in c++ generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"409015461 fix file type in qt5cpp")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a4bcb3bc7 fix datetime and map type for qt5cpp")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"23b31aba8 ","[","qt5cpp] Fix crash when API return a map container")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3b031ed2b ","[","qt5cpp] delete callback data allocated before signal emission")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1bb1e44d1 ","[","qt5cpp] Remove qt5 pro.user file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"194722015 Qt5cpp plug memleaks part2")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"12f3661d6 Qt5cpp plug memleaks")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ea4b94842 ","[","qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0bf430a80 Qt5cpp Add support for nested containers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7c734445b fix file parameter in header file (cpprest)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"070b5c00b fix object type declaration in cpprest")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bad1885b4 ","[","cpprest] add parameterToString for number type with unspecified format (double)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"73bd24db7 ","[","cpprest] Add support for nested vectors")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ee2eb74f7 ","[","qt] update Qt client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d82499944 Adding qt project generation fix")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9bd94b4db ","[","qt] Fix warning message")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"clojure"}),"Clojure")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d7e374504 ","[","Clojure] Add util method to set the api-context globally (#93)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"dart"}),"Dart")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f1638a659 ","[","Dart] Allow setting an accessToken for OAuth")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a5e26a44f ","[","Dart] - Rework Dart client generator to be flutter-compatible")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"elixir"}),"Elixir")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f9b2839a3 ","[","Elixir] Check date value before calling to_iso8601")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"elm"}),"Elm")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5a87fe695 ","[","elm] Fix operations with empty responses (#171)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a5cf27b60 Fix Petstore example for Elm (#96)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c522927d5 Fix Elm generator for polymorphism (#78)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7d9fb9f51 Add CI test for Elm in travis (#40)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"769a65c95 ","[","Elm] Add support for array schemas")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"56a0268e3 ","[","elm] missing '->' in Main elm template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"erlang"}),"Erlang")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c73118524 ","[","erlang-client] Erlang request utils")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"049eef9c5 Test erlang client, server petstore")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bcc7b788e fix erlang client compilation error")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"go"}),"Go")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"acb63fd5e Fix go readme, remove resty install")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d8362d85 Update go client, fix double body read")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"47614bb76 Properly capitalize exported go types")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ee561fcd6 Add withXml option for Go language")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0f6696089 ","[","Go] Use consistent indentation in readme ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"72abb20f2 ","[","Go] Fix operation files clobbering model files. ","[","2.4.0]")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"haskell"}),"Haskell")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"34db79b9b ","[","haskell-http-client] update dependency versions + readme (#81)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e45b3784f Fix NPE with Haskell client generator with OAS3 spec")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d3401396f ","[","haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4bc99b9da minor fixes to haskell http client generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2d0bafb6b ","[","haskell-http-client] default InlineMimeTypes=true")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9fba9c325 ","[","haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"kotlin"}),"Kotlin")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3322fbf7 ","[","kotlin] Add OkHttpClient.Builder to ApiClient.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3c5fb1d80 ","[","kotlin] Add json annotation to each enum value.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"39fa375e3 ","[","kotlin] Fix NPE for POST/PUT/PATCH with empty request models.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c69925b53 ","[","Kotlin] Fix issues with threetenbp ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a811a48c3 minor fix to kotlin client generator due to merge conflict")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"914275fe7 ","[","kotlin] support selection of datelibrary")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"lua"}),"Lua")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dbe78e23e ","[","Lua] Improve auto-generated test files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6c79052ac Add auto-generated Lua spec files for APIs, models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"38a2c1dde ","[","Lua] Fix Rockpec")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a2410b210 Add auto-generated rockspec file to Lua API client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"df10c725a Add lua test script, minor fix to Lua API files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"java"}),"Java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2e69e6c03 build.gradle should not have commas")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1a4e5a4e5 Java client: Add constants for libraries (#163)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7db0201a8 Fix NPEs in Java generator (#154)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"072ce070b resteasy: fix outer enum case (#139)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ccd002966 ","[","Java] rest-assured: fix javadoc in templates")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e7410d4c8 Allow $ in java var name")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"03490e923 Fix Java binary mapping")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"70b4b55fa Fix performance linting problem with maps in Java ApiClient template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"cddcda0fe ","[","Java]","[Jersey2]"," Make generated client code thread safe")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"298ca8d35 use correct jackson date library when using Java 8")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"53eeb0c04 ","[","Java] fix connection leak on retrofit OAuth token renewal")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"61c25e711 ","[","Java] Fixes for retrofit")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f02332755 ","[","JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4eeb974cb ","[","Java]","[google-api-client]"," Fix bug with empty POST request not sending content-type")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d4543a99e ","[","Java]","[retrofit2]"," file upload sets filename as baseName instead of a dynamic filename")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"62a930223 ","[","JAVA]","[Rest-assured]"," reqSpec() method has been added into api.mustache for requests custom\u2026")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fec0363f7 ","[","Java] Add back byte array enhancement")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"59ff4c198 ","[","Java]","[library: vertx]"," Add default value and required parameter support to vertx server temp\u2026")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3bd2da9a8 ","[","Java] Fix build warnings")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"429b96ae7 ","[","JAVA] equals and hashCode for models with byte[] and binary strings")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"495971c2c ","[","Java] use html entities in javadoc of generated code (#106)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"82ee8656f ","[","java] Enum in array of array (#66)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bf7e4e7df Java gson: add @SerializedName value as constant (#22)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"30c1448d7 Fix build.gradle for Java RESTEasy client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"642c0566d ","[","Java] Use Rx2 Completable for Void Retrofit2 responses")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"72221b1cf Adding @Deprecated to retrofit2 client interfaces.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"47111b324 ","[","Java] fix gson deserialize format byte")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9e06f7063 ","[","Java] Fix assignment of new object instance to variable")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"006f084b5 ","[","Java] Allow to set values with setApiPackage(..) and setModelPackage(..)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"javascriptnodejs"}),"JavaScript/NodeJS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d80e29585 Fix JS test using baseName in default value (#5)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fe15f4690 fix toDefaultValueWithParam in JS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"90859575e Fixing variable name typo (instane -> instance)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"objective-c"}),"Objective-C")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d1874028 add class as a keyword in objc generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1b8df5c20 Update ObjcClientCodegen.java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"246ed5754 restore objc reserved word: property")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"php"}),"PHP")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3beeb4e77 ","[","PHP] Not-required properties now shows as nullable (#129)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"37df59d6f ","[","PHP] Adjust the names (script, sample folder, generator) to lang option (#159)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4a5d16b23 ","[","PHP] Fix string length validation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d58835e57 ","[","PHP] Improve: Make validation strict")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"cf8d8d56f ","[","PHP] Fix code example from README. Variable name was missing when using Basic auth.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0adbf7e51 ","[","PHP] Improve: update sample tests automatically")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"32cf2f16f ","[","PHP] Non required enum property")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3bcf0ff76 ","[","PHP] Add path & file separator (/) to return the correct path when deserializing a file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"14e1e1980 ","[","PHP] Improve validation on empty arrays")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"809e1f4c9 ","[","PHP] Cleanup tests")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"76907cacd ","[","PHP] declare property headerSelector")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"python"}),"Python")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7184f1ec6 ","[","python] asyncio supports _preload_content; remove unused imports (#107)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d74d2ba03 fix: python clients")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"8e0a0ebd6 Fix python / tornado body handling")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b39c35c76 Fix inconsistency between model name and file name in python client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f6e0e297e ","[","python-asyncio] tests and fixes")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"r"}),"R")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"61e58d649 Add R namespace file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"ruby"}),"Ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a08164592 fix ruby parameters in documentation, fix requiredParams, optionalParams")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"8e34f9a98 update to newer version of ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"aa6b217bb ","[","Ruby] Add auto-generated rubocop config file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"rust"}),"Rust")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b44357394 ","[","Rust] Implement minimal auth support")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0b845a57e ","[","Rust] Changes hard coded body to dynamic parameter name - ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3c97753f ","[","Rust] Handles UUID as string")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"027df610b ","[","Rust] Handle error response statuses")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"66be7a791 ","[","Rust] Add user agent handling for rust template (master) ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3029b7b0f ","[","Rust] Format example with rustfmt")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"scala"}),"Scala")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"197b4481e normalize akka-scala and Java README")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"612cfb7af ","[","Akka-scala] Clean unused dependencies such swagger-core")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"86697fedb ","[","Scala]","[Gatling]"," correct body params filename")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"832919b84 ","[","Scala]","[Akka]"," Remove unused dep when model package is empty")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"swift"}),"Swift")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"40d5d0990 ","[","Swift4] accept empty content with default client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3b7230b17 ","[","Swift 4] Fix APIHelper to accept array parameter")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e22faf4cd ","[","Swift] Add public initializer for modelObject.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b184fb1d9 ","[","Swift3] escape URL parameters")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3d0f1d4b Swift4: make generated models structs instead of classes")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"typescript"}),"TypeScript")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f615d823f update ts node dependencies")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9ac9bc0dc ","[","TypeScript] enhance ts import")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"009dcf009 Mark ",Object(n.b)("inlineCode",{parentName:"p"},"not required")," swagger properties as optional typescript properties")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bdd2c2a4e Misc typescript Angular code generation improvements")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"260375c9e Fix typescript-node generation of array type models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"20305139b ","[","Feature]","[TypeScript]"," request param enum as literal unions")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9b8602311 ","[","TypeScript] Make OpenAPI Generator serialize subclasses properly (#102)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4bc5ffe86 ","[","typescript-angular] add provided in support (#120)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ef832e715 ","[","Feature]","[TS Angular]"," improve docs angular import")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fc7e08346 ","[","TS]","[Fetch]"," Add interfaces option")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"157e6b7fa ","[","angular] Add option to generate tagged unions")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7faaa091c Fix generated module imports in Aurelia APIs")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b5f0b24ba ","[","TS] fix object declaration in model")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"api-servers"}),"API Servers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-2"}),"C++")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6fef0a7ff fix string issue with restbed generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a339422bd move get type declaration method to c++ restbed")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-3"}),"C#")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d9d653016 ","[","aspnetcore] Make the use of Swashbuckle optional (#110)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9a8183ab0 ","[","aspnetcore] Fix openapi.json location rename (#56)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"12abfb968 ","[","aspnetcore] Update Dockerfile")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"866817587 ","[","aspnetcore] Fix string enum generation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"java-1"}),"Java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bd50d368e ","[","JAVA - jaxrs-resteasy-eap] Add import to models (#179)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7efda597c Fix issue with useBeanValidation option in Java server generators (#160)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"71b5de3ed Do not set contextPath for spring-boot (#104)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4d7fc046f ","[",'JaxRS] Add "validation-api" dependency in jetty (#30)')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ce930e7a6 ","[","Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client" ')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d92717dc update jaxrs to listen at port 10080")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7c2031675 update artifact id for jaxrs datelib j8")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"88c5112f2 Adds support for returning response in jaxrs-spec interfaces")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6bf84d5fa ","[","JAXRS-SPEC] Fix lowercase enums sent as uppercase")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85)')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"161948657 Add reactive option for Spring Boot (webflux)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ff1178ad7 ","[","Java]","[Spring]"," fix missing optional query params")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2103fadab Fix package declaration for play-framework")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2c6380c84 fix inner item (list, map) for play framework")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"99fc27246 ","[","JAX-RS]","[Spec]"," Removes throws Exception.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored).')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d890d733f ","[","JaxRS]","[Java]"," issue with implFolder on windows, and required fields generation for containers (#88)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c91ce17ae Feature/javaPlayWithAsynchronousControllers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f00a1ef52 ","[","JAVA] Correct consumes/produces attributes for Spring Controllers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d14318cf2 ","[","JAVA]","[Spring]"," Optional params with delegate")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3f81378d7 ","[","java resteasy] fix string comparison (#134)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5ea3d3bb1 ","[","JAX-RS]","[SPEC]"," Bug fix that prevents generating interfaces when interfaceOnly is false.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"kotlin-1"}),"Kotlin")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7cad47dd3 ","[","kotlin-server] --library=ktor (barebones implementation)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"752b36e66 ","[","Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"nodejs"}),"NodeJS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6d88d073c ","[","NodeJS] make serverPort configurable via CLI option")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e7f4fb3c4 Fix nodejs-server path issue in windows platform")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"php-1"}),"PHP")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d30fcbabb Fixes for php-ze-ph generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"60e3339aa ","[","Feature]","[PHP]"," Update for ze-ph generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"python-1"}),"Python")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"62b93fc5c ","[","Python]","[Flask]"," Handles UUID format - ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9999eac52 fix python flask parameter naming")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"scala-1"}),"Scala")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d5c355a59 ","[","Scalatra] Updated the version of Scalatra to the latest (2.6.2)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"52322c47c ","[","finch] Allow finch server to compile for CI checks (#7)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"ruby-1"}),"Ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dcad9ae80 ","[","Rails5] make version of the generated Rails stub server to strict Rails 5.0")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"rust-1"}),"Rust")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"37faaf926 ","[","rust-server] API version constant and composite version support")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6c7813e79 ","[","rust-server] asynchronous support via hyper v0.11")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"documentation"}),"Documentation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"25a6a9d44 html: fix typo in class name "))),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"miscellaneous"}),"Miscellaneous")),Object(n.b)("li",{parentName:"ul"},"f04213285 Cli error message improvements (#172)"),Object(n.b)("li",{parentName:"ul"},"0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90)"),Object(n.b)("li",{parentName:"ul"},"64f2bea37 Fix getReferenced...() methods in ModelUtils (#157)"),Object(n.b)("li",{parentName:"ul"},"16ff5174e Update swagger-parser to 2.0.1 (#123)"),Object(n.b)("li",{parentName:"ul"},"76b7307a6 DefaultGenerator: ignore only form param schemas (#74)"),Object(n.b)("li",{parentName:"ul"},"a3aabd390 Create a default implementation of delegate if none could be autowired (#92)"),Object(n.b)("li",{parentName:"ul"},"ca89af808 Switch to Java 8"),Object(n.b)("li",{parentName:"ul"},"27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57)"),Object(n.b)("li",{parentName:"ul"},"a1ff50241 Rename datatype to dataType in CodegenProperty (#69)"),Object(n.b)("li",{parentName:"ul"},"3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91)"),Object(n.b)("li",{parentName:"ul"},"488910362 Set parameters allowableValues dynamically (#65)"),Object(n.b)("li",{parentName:"ul"},'2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89)'),Object(n.b)("li",{parentName:"ul"},"82d9e935e Add CORS configuration to openapi-generator-online (#71)"),Object(n.b)("li",{parentName:"ul"},"e3814f51d Improvements to online codegen (#55)"),Object(n.b)("li",{parentName:"ul"},"6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45)"),Object(n.b)("li",{parentName:"ul"},"7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54)"),Object(n.b)("li",{parentName:"ul"},"8dd46a3fb Move online gen from jersey to spring boot (#44)"),Object(n.b)("li",{parentName:"ul"},"803821e21 Fix an issue with example generator when array is too large (#46)"),Object(n.b)("li",{parentName:"ul"},"673f2bc46 Add CodegenProperty.nameInSnakeCase (#42)"),Object(n.b)("li",{parentName:"ul"},"67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38)"),Object(n.b)("li",{parentName:"ul"},"10ac4024d Code clean-up: remove field declaration hiding existing fields (#35)"),Object(n.b)("li",{parentName:"ul"},"ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26)"),Object(n.b)("li",{parentName:"ul"},"41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19)"),Object(n.b)("li",{parentName:"ul"},"13f084e7b Fix dataTypeWithEnum for array of form parameters"),Object(n.b)("li",{parentName:"ul"},"fd3b883e8 ","[","DefaultCodegen] Fill CodegenOperation::produces with unique media types"),Object(n.b)("li",{parentName:"ul"},"db9a899a0 update getSchemaType variable, remove unused import"),Object(n.b)("li",{parentName:"ul"},"d74b4cdf8 fix map type and collection format for form parameter (array)"),Object(n.b)("li",{parentName:"ul"},"d99f46cff Revise how to obtain the example value"),Object(n.b)("li",{parentName:"ul"},"b1eac05b2 Fix form datatype (array of string)"),Object(n.b)("li",{parentName:"ul"},"3c666a6d4 Fix array of form parameters"),Object(n.b)("li",{parentName:"ul"},"1492df6ce Override server port for Jetty configuration"),Object(n.b)("li",{parentName:"ul"},"622a75b2c Fix data type shadowing"),Object(n.b)("li",{parentName:"ul"},"861d11d01 use vendor extension in operation to set the body parameter name"),Object(n.b)("li",{parentName:"ul"},"80c8b92cb add postProcessParameter for body, form parameter"),Object(n.b)("li",{parentName:"ul"},"7fe555a51 Set collectionFormat default only for array"),Object(n.b)("li",{parentName:"ul"},"16589de97 default collection format to csv according to the spec"),Object(n.b)("li",{parentName:"ul"},"edbe4902a Consider '$ref' for consumes and produces in CodegenOperation"),Object(n.b)("li",{parentName:"ul"},"e24238a35 Improve getter name handling for boolean properties"),Object(n.b)("li",{parentName:"ul"},"6e2ca294b update discriminator to discriminatorName"),Object(n.b)("li",{parentName:"ul"},"74075c087 Primitive datatype in Schema components"),Object(n.b)("li",{parentName:"ul"},"d8abd4a14 support map in body parameter"),Object(n.b)("li",{parentName:"ul"},"186594115 Update swagger-core to 2.0.1"),Object(n.b)("li",{parentName:"ul"},"2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface"),Object(n.b)("li",{parentName:"ul"},"d0e2d7684 Getter and Setter for hideGenerationTimestamp"),Object(n.b)("li",{parentName:"ul"},"adbde2fb6 replace fromOperation with postProcessOperations"),Object(n.b)("li",{parentName:"ul"},"9d1ae0dd2 fix bigdecimal in default codegen"),Object(n.b)("li",{parentName:"ul"},"ffa0e115d fix default value and type declaration"),Object(n.b)("li",{parentName:"ul"},"0e744adb8 Apply collection format to SIMPLE enum style"),Object(n.b)("li",{parentName:"ul"},"36ed29852 Tweak tests according to the parameter order changes"),Object(n.b)("li",{parentName:"ul"},"17b082793 Move 'enum_query_double' to parameters section"),Object(n.b)("li",{parentName:"ul"},"28fcf48f4 Add a method returns discriminator name"),Object(n.b)("li",{parentName:"ul"},"7daa2ec5d Fix broken discriminator"),Object(n.b)("li",{parentName:"ul"},"faa901640 Replace with the helper function: ",Object(n.b)("inlineCode",{parentName:"li"},"getTypeDeclaration")),Object(n.b)("li",{parentName:"ul"},"c8650d0e3 Make optional properties in models optional parameters"),Object(n.b)("li",{parentName:"ul"},"40c30dd2f Fix inputSpec for multi module builds"),Object(n.b)("li",{parentName:"ul"},"5326152cc add option to reorder form/body parameter"),Object(n.b)("li",{parentName:"ul"},"d1850091a Improve JMeter Template"),Object(n.b)("li",{parentName:"ul"},"fedfb0cda Factorize addOption/addSwitch method"),Object(n.b)("li",{parentName:"ul"},"e73eeb4fd fix for stripping prefix on single enums"),Object(n.b)("li",{parentName:"ul"},"13e3db59e Add operationIdOriginal to store the original operationId"),Object(n.b)("li",{parentName:"ul"},"0b2d80569 Expose getter/setter for serverPort to facilitate testing"),Object(n.b)("li",{parentName:"ul"},"8e270f465 add vendorExtensions field in CodegenSecurity class"),Object(n.b)("li",{parentName:"ul"},"1ee85de94 Added Intelli J ignore"),Object(n.b)("li",{parentName:"ul"},"7b8e409cf Added gitignore generation function")))}m.isMDXComponent=!0},312:function(e,a,t){"use strict";t.d(a,"a",(function(){return o})),t.d(a,"b",(function(){return j}));var r=t(0),b=t.n(r);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var a=1;a=0||(b[t]=e[t]);return b}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(b[t]=e[t])}return b}var c=b.a.createContext({}),m=function(e){var a=b.a.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},o=function(e){var a=m(e.components);return b.a.createElement(c.Provider,{value:a},e.children)},d={inlineCode:"code",wrapper:function(e){var a=e.children;return b.a.createElement(b.a.Fragment,{},a)}},s=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,n=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),o=m(t),s=r,j=o["".concat(i,".").concat(s)]||o[s]||d[s]||n;return t?b.a.createElement(j,l({ref:a},c,{components:t})):b.a.createElement(j,l({ref:a},c))}));function j(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var n=t.length,i=new Array(n);i[0]=s;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c" instead of "->". ')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7d2b49085 ","[","Ada] wrong order for generated structures in models.ads files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2b2b85eec ","[","Ada] wrong JSON in POST operations")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c"}),"C#")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0e34bcf4e ","[","csharp] ctor params should always be camelCase")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"872471996 ","[","csharp] Support arrays of arrays for properties and models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1c4e6b7d4 ","[","csharp] Fix ToJson to work with composition and polymorphism")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ed7af73f6 ","[","csharp] Reference this.Configuration in client API template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-1"}),"C++")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e796e4c36 ","[","C++] Add linux as a reserve keyword")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"36f69a034 remove trailing spaces in qt5 c++ templates")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f192613f1 fix string type in c++ generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"409015461 fix file type in qt5cpp")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a4bcb3bc7 fix datetime and map type for qt5cpp")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"23b31aba8 ","[","qt5cpp] Fix crash when API return a map container")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3b031ed2b ","[","qt5cpp] delete callback data allocated before signal emission")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1bb1e44d1 ","[","qt5cpp] Remove qt5 pro.user file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"194722015 Qt5cpp plug memleaks part2")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"12f3661d6 Qt5cpp plug memleaks")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ea4b94842 ","[","qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0bf430a80 Qt5cpp Add support for nested containers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0b3ec6b1f fix NPE with cpp qt5, add logic to avoid NPE with composed schema")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7c734445b fix file parameter in header file (cpprest)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"070b5c00b fix object type declaration in cpprest")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bad1885b4 ","[","cpprest] add parameterToString for number type with unspecified format (double)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"73bd24db7 ","[","cpprest] Add support for nested vectors")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ee2eb74f7 ","[","qt] update Qt client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d82499944 Adding qt project generation fix")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9bd94b4db ","[","qt] Fix warning message")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"clojure"}),"Clojure")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d7e374504 ","[","Clojure] Add util method to set the api-context globally (#93)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"dart"}),"Dart")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f1638a659 ","[","Dart] Allow setting an accessToken for OAuth")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a5e26a44f ","[","Dart] - Rework Dart client generator to be flutter-compatible")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"elixir"}),"Elixir")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f9b2839a3 ","[","Elixir] Check date value before calling to_iso8601")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"elm"}),"Elm")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5a87fe695 ","[","elm] Fix operations with empty responses (#171)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a5cf27b60 Fix Petstore example for Elm (#96)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c522927d5 Fix Elm generator for polymorphism (#78)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7d9fb9f51 Add CI test for Elm in travis (#40)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"769a65c95 ","[","Elm] Add support for array schemas")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"56a0268e3 ","[","elm] missing '->' in Main elm template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"erlang"}),"Erlang")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c73118524 ","[","erlang-client] Erlang request utils")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"049eef9c5 Test erlang client, server petstore")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bcc7b788e fix erlang client compilation error")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"go"}),"Go")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"acb63fd5e Fix go readme, remove resty install")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d8362d85 Update go client, fix double body read")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"47614bb76 Properly capitalize exported go types")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ee561fcd6 Add withXml option for Go language")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0f6696089 ","[","Go] Use consistent indentation in readme ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"72abb20f2 ","[","Go] Fix operation files clobbering model files. ","[","2.4.0]")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"haskell"}),"Haskell")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"34db79b9b ","[","haskell-http-client] update dependency versions + readme (#81)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e45b3784f Fix NPE with Haskell client generator with OAS3 spec")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d3401396f ","[","haskell-http-client] remove duplicates in produces/consumes; fix pathParam paramName issue")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4bc99b9da minor fixes to haskell http client generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2d0bafb6b ","[","haskell-http-client] default InlineMimeTypes=true")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9fba9c325 ","[","haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"kotlin"}),"Kotlin")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3322fbf7 ","[","kotlin] Add OkHttpClient.Builder to ApiClient.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3c5fb1d80 ","[","kotlin] Add json annotation to each enum value.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"39fa375e3 ","[","kotlin] Fix NPE for POST/PUT/PATCH with empty request models.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c69925b53 ","[","Kotlin] Fix issues with threetenbp ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a811a48c3 minor fix to kotlin client generator due to merge conflict")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"914275fe7 ","[","kotlin] support selection of datelibrary")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"lua"}),"Lua")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dbe78e23e ","[","Lua] Improve auto-generated test files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6c79052ac Add auto-generated Lua spec files for APIs, models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"38a2c1dde ","[","Lua] Fix Rockpec")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a2410b210 Add auto-generated rockspec file to Lua API client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"df10c725a Add lua test script, minor fix to Lua API files")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"java"}),"Java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2e69e6c03 build.gradle should not have commas")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1a4e5a4e5 Java client: Add constants for libraries (#163)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7db0201a8 Fix NPEs in Java generator (#154)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4d7ff8cfb JavaDoc fixes for Java/RESTEasy client (#151)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"072ce070b resteasy: fix outer enum case (#139)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ccd002966 ","[","Java] rest-assured: fix javadoc in templates")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e7410d4c8 Allow $ in java var name")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"03490e923 Fix Java binary mapping")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"70b4b55fa Fix performance linting problem with maps in Java ApiClient template")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"cddcda0fe ","[","Java]","[Jersey2]"," Make generated client code thread safe")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"298ca8d35 use correct jackson date library when using Java 8")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"53eeb0c04 ","[","Java] fix connection leak on retrofit OAuth token renewal")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"61c25e711 ","[","Java] Fixes for retrofit")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f02332755 ","[","JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4eeb974cb ","[","Java]","[google-api-client]"," Fix bug with empty POST request not sending content-type")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d4543a99e ","[","Java]","[retrofit2]"," file upload sets filename as baseName instead of a dynamic filename")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"62a930223 ","[","JAVA]","[Rest-assured]"," reqSpec() method has been added into api.mustache for requests custom\u2026")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fec0363f7 ","[","Java] Add back byte array enhancement")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"59ff4c198 ","[","Java]","[library: vertx]"," Add default value and required parameter support to vertx server temp\u2026")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3bd2da9a8 ","[","Java] Fix build warnings")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"429b96ae7 ","[","JAVA] equals and hashCode for models with byte[] and binary strings")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"495971c2c ","[","Java] use html entities in javadoc of generated code (#106)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"82ee8656f ","[","java] Enum in array of array (#66)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bf7e4e7df Java gson: add @SerializedName value as constant (#22)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"30c1448d7 Fix build.gradle for Java RESTEasy client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"642c0566d ","[","Java] Use Rx2 Completable for Void Retrofit2 responses")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"72221b1cf Adding @Deprecated to retrofit2 client interfaces.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"47111b324 ","[","Java] fix gson deserialize format byte")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9e06f7063 ","[","Java] Fix assignment of new object instance to variable")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"006f084b5 ","[","Java] Allow to set values with setApiPackage(..) and setModelPackage(..)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"javascriptnodejs"}),"JavaScript/NodeJS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d80e29585 Fix JS test using baseName in default value (#5)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fe15f4690 fix toDefaultValueWithParam in JS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"90859575e Fixing variable name typo (instane -> instance)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"objective-c"}),"Objective-C")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9fb2c29a4 7644 objc deprecated afnetworking datataskwithrequest")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d1874028 add class as a keyword in objc generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"1b8df5c20 Update ObjcClientCodegen.java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"246ed5754 restore objc reserved word: property")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"php"}),"PHP")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3beeb4e77 ","[","PHP] Not-required properties now shows as nullable (#129)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"37df59d6f ","[","PHP] Adjust the names (script, sample folder, generator) to lang option (#159)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4a5d16b23 ","[","PHP] Fix string length validation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d58835e57 ","[","PHP] Improve: Make validation strict")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"cf8d8d56f ","[","PHP] Fix code example from README. Variable name was missing when using Basic auth.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0adbf7e51 ","[","PHP] Improve: update sample tests automatically")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"32cf2f16f ","[","PHP] Non required enum property")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3bcf0ff76 ","[","PHP] Add path & file separator (/) to return the correct path when deserializing a file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"14e1e1980 ","[","PHP] Improve validation on empty arrays")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"809e1f4c9 ","[","PHP] Cleanup tests")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"76907cacd ","[","PHP] declare property headerSelector")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"python"}),"Python")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7184f1ec6 ","[","python] asyncio supports _preload_content; remove unused imports (#107)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d74d2ba03 fix: python clients")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"8e0a0ebd6 Fix python / tornado body handling")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b39c35c76 Fix inconsistency between model name and file name in python client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dfbef4374 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f6e0e297e ","[","python-asyncio] tests and fixes")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"r"}),"R")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"61e58d649 Add R namespace file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"ruby"}),"Ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a08164592 fix ruby parameters in documentation, fix requiredParams, optionalParams")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"8e34f9a98 update to newer version of ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"aa6b217bb ","[","Ruby] Add auto-generated rubocop config file")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"rust"}),"Rust")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b44357394 ","[","Rust] Implement minimal auth support")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"0b845a57e ","[","Rust] Changes hard coded body to dynamic parameter name - ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3c97753f ","[","Rust] Handles UUID as string")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"027df610b ","[","Rust] Handle error response statuses")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"66be7a791 ","[","Rust] Add user agent handling for rust template (master) ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3029b7b0f ","[","Rust] Format example with rustfmt")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"scala"}),"Scala")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"197b4481e normalize akka-scala and Java README")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"612cfb7af ","[","Akka-scala] Clean unused dependencies such swagger-core")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"86697fedb ","[","Scala]","[Gatling]"," correct body params filename")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"832919b84 ","[","Scala]","[Akka]"," Remove unused dep when model package is empty")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"swift"}),"Swift")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"40d5d0990 ","[","Swift4] accept empty content with default client")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3b7230b17 ","[","Swift 4] Fix APIHelper to accept array parameter")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e22faf4cd ","[","Swift] Add public initializer for modelObject.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b184fb1d9 ","[","Swift3] escape URL parameters")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"52f606b8d Fix Swift3 test cases and add pom.xml, travis config for iOS test")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a3d0f1d4b Swift4: make generated models structs instead of classes")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"typescript"}),"TypeScript")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f615d823f update ts node dependencies")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9ac9bc0dc ","[","TypeScript] enhance ts import")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"009dcf009 Mark ",Object(n.b)("inlineCode",{parentName:"p"},"not required")," swagger properties as optional typescript properties")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bdd2c2a4e Misc typescript Angular code generation improvements")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"260375c9e Fix typescript-node generation of array type models")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d1933b5fc Fix a problem in the generation of typescript-jquery when we have enum in a query param")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"20305139b ","[","Feature]","[TypeScript]"," request param enum as literal unions")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"524f162e6 Use supportsES6 flag in ts compilation for language typescript-angular")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9b8602311 ","[","TypeScript] Make OpenAPI Generator serialize subclasses properly (#102)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4bc5ffe86 ","[","typescript-angular] add provided in support (#120)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ef832e715 ","[","Feature]","[TS Angular]"," improve docs angular import")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"fc7e08346 ","[","TS]","[Fetch]"," Add interfaces option")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"157e6b7fa ","[","angular] Add option to generate tagged unions")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7faaa091c Fix generated module imports in Aurelia APIs")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b5f0b24ba ","[","TS] fix object declaration in model")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"api-servers"}),"API Servers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-2"}),"C++")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6fef0a7ff fix string issue with restbed generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"a339422bd move get type declaration method to c++ restbed")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"c-3"}),"C#")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d9d653016 ","[","aspnetcore] Make the use of Swashbuckle optional (#110)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9a8183ab0 ","[","aspnetcore] Fix openapi.json location rename (#56)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"12abfb968 ","[","aspnetcore] Update Dockerfile")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"866817587 ","[","aspnetcore] Fix string enum generation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"java-1"}),"Java")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"bd50d368e ","[","JAVA - jaxrs-resteasy-eap] Add import to models (#179)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7efda597c Fix issue with useBeanValidation option in Java server generators (#160)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"71b5de3ed Do not set contextPath for spring-boot (#104)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"4d7fc046f ","[",'JaxRS] Add "validation-api" dependency in jetty (#30)')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ce930e7a6 ","[","Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client" ')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5d92717dc update jaxrs to listen at port 10080")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7c2031675 update artifact id for jaxrs datelib j8")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"88c5112f2 Adds support for returning response in jaxrs-spec interfaces")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6bf84d5fa ","[","JAXRS-SPEC] Fix lowercase enums sent as uppercase")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85)')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"161948657 Add reactive option for Spring Boot (webflux)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"ff1178ad7 ","[","Java]","[Spring]"," fix missing optional query params")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2103fadab Fix package declaration for play-framework")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"2c6380c84 fix inner item (list, map) for play framework")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"99fc27246 ","[","JAX-RS]","[Spec]"," Removes throws Exception.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},'fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored).')),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d890d733f ","[","JaxRS]","[Java]"," issue with implFolder on windows, and required fields generation for containers (#88)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"c91ce17ae Feature/javaPlayWithAsynchronousControllers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"f00a1ef52 ","[","JAVA] Correct consumes/produces attributes for Spring Controllers")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d14318cf2 ","[","JAVA]","[Spring]"," Optional params with delegate")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"3f81378d7 ","[","java resteasy] fix string comparison (#134)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"5ea3d3bb1 ","[","JAX-RS]","[SPEC]"," Bug fix that prevents generating interfaces when interfaceOnly is false.")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"kotlin-1"}),"Kotlin")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"7cad47dd3 ","[","kotlin-server] --library=ktor (barebones implementation)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"752b36e66 ","[","Kotlin] Sanitize enumeration name to add underscore when it starts with digits (#77)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"nodejs"}),"NodeJS")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6d88d073c ","[","NodeJS] make serverPort configurable via CLI option")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"e7f4fb3c4 Fix nodejs-server path issue in windows platform")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"php-1"}),"PHP")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d30fcbabb Fixes for php-ze-ph generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"60e3339aa ","[","Feature]","[PHP]"," Update for ze-ph generator")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"python-1"}),"Python")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"62b93fc5c ","[","Python]","[Flask]"," Handles UUID format - ")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"9999eac52 fix python flask parameter naming")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"scala-1"}),"Scala")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"d5c355a59 ","[","Scalatra] Updated the version of Scalatra to the latest (2.6.2)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"52322c47c ","[","finch] Allow finch server to compile for CI checks (#7)")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"ruby-1"}),"Ruby")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"dcad9ae80 ","[","Rails5] make version of the generated Rails stub server to strict Rails 5.0")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h3",Object(r.a)({parentName:"li"},{id:"rust-1"}),"Rust")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"37faaf926 ","[","rust-server] API version constant and composite version support")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"6c7813e79 ","[","rust-server] asynchronous support via hyper v0.11")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"documentation"}),"Documentation")),Object(n.b)("li",{parentName:"ul"},Object(n.b)("p",{parentName:"li"},"25a6a9d44 html: fix typo in class name "))),Object(n.b)("ul",null,Object(n.b)("li",{parentName:"ul"},Object(n.b)("h2",Object(r.a)({parentName:"li"},{id:"miscellaneous"}),"Miscellaneous")),Object(n.b)("li",{parentName:"ul"},"f04213285 Cli error message improvements (#172)"),Object(n.b)("li",{parentName:"ul"},"0ece706a4 Remove CodegenConfig.fromModel(String, Schema) method (#90)"),Object(n.b)("li",{parentName:"ul"},"64f2bea37 Fix getReferenced...() methods in ModelUtils (#157)"),Object(n.b)("li",{parentName:"ul"},"16ff5174e Update swagger-parser to 2.0.1 (#123)"),Object(n.b)("li",{parentName:"ul"},"76b7307a6 DefaultGenerator: ignore only form param schemas (#74)"),Object(n.b)("li",{parentName:"ul"},"a3aabd390 Create a default implementation of delegate if none could be autowired (#92)"),Object(n.b)("li",{parentName:"ul"},"ca89af808 Switch to Java 8"),Object(n.b)("li",{parentName:"ul"},"27426f7b5 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57)"),Object(n.b)("li",{parentName:"ul"},"a1ff50241 Rename datatype to dataType in CodegenProperty (#69)"),Object(n.b)("li",{parentName:"ul"},"3b9a2a7c3 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91)"),Object(n.b)("li",{parentName:"ul"},"488910362 Set parameters allowableValues dynamically (#65)"),Object(n.b)("li",{parentName:"ul"},'2821f18b9 Meta: set version for "build-helper-maven-plugin" (#89)'),Object(n.b)("li",{parentName:"ul"},"82d9e935e Add CORS configuration to openapi-generator-online (#71)"),Object(n.b)("li",{parentName:"ul"},"e3814f51d Improvements to online codegen (#55)"),Object(n.b)("li",{parentName:"ul"},"6b8079808 Consider minLength, maxLength and pattern in referenced schema (#45)"),Object(n.b)("li",{parentName:"ul"},"7c5dfbfa0 Minor improvements to OpenAPI Generator Online (#54)"),Object(n.b)("li",{parentName:"ul"},"8dd46a3fb Move online gen from jersey to spring boot (#44)"),Object(n.b)("li",{parentName:"ul"},"803821e21 Fix an issue with example generator when array is too large (#46)"),Object(n.b)("li",{parentName:"ul"},"673f2bc46 Add CodegenProperty.nameInSnakeCase (#42)"),Object(n.b)("li",{parentName:"ul"},"67ebe17dd Fix isPrimitiveType flag for array of form parameters (#38)"),Object(n.b)("li",{parentName:"ul"},"10ac4024d Code clean-up: remove field declaration hiding existing fields (#35)"),Object(n.b)("li",{parentName:"ul"},"ab9c4b5a6 Code clean-up: Add own private static final LOGGER in each class (#26)"),Object(n.b)("li",{parentName:"ul"},"41b0ff351 Code clean-up: remove DefaultCodegen#getSimpleRef(String) (#19)"),Object(n.b)("li",{parentName:"ul"},"13f084e7b Fix dataTypeWithEnum for array of form parameters"),Object(n.b)("li",{parentName:"ul"},"fd3b883e8 ","[","DefaultCodegen] Fill CodegenOperation::produces with unique media types"),Object(n.b)("li",{parentName:"ul"},"db9a899a0 update getSchemaType variable, remove unused import"),Object(n.b)("li",{parentName:"ul"},"d74b4cdf8 fix map type and collection format for form parameter (array)"),Object(n.b)("li",{parentName:"ul"},"d99f46cff Revise how to obtain the example value"),Object(n.b)("li",{parentName:"ul"},"b1eac05b2 Fix form datatype (array of string)"),Object(n.b)("li",{parentName:"ul"},"3c666a6d4 Fix array of form parameters"),Object(n.b)("li",{parentName:"ul"},"1492df6ce Override server port for Jetty configuration"),Object(n.b)("li",{parentName:"ul"},"622a75b2c Fix data type shadowing"),Object(n.b)("li",{parentName:"ul"},"861d11d01 use vendor extension in operation to set the body parameter name"),Object(n.b)("li",{parentName:"ul"},"80c8b92cb add postProcessParameter for body, form parameter"),Object(n.b)("li",{parentName:"ul"},"7fe555a51 Set collectionFormat default only for array"),Object(n.b)("li",{parentName:"ul"},"16589de97 default collection format to csv according to the spec"),Object(n.b)("li",{parentName:"ul"},"edbe4902a Consider '$ref' for consumes and produces in CodegenOperation"),Object(n.b)("li",{parentName:"ul"},"e24238a35 Improve getter name handling for boolean properties"),Object(n.b)("li",{parentName:"ul"},"6e2ca294b update discriminator to discriminatorName"),Object(n.b)("li",{parentName:"ul"},"74075c087 Primitive datatype in Schema components"),Object(n.b)("li",{parentName:"ul"},"d8abd4a14 support map in body parameter"),Object(n.b)("li",{parentName:"ul"},"186594115 Update swagger-core to 2.0.1"),Object(n.b)("li",{parentName:"ul"},"2034f61e5 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface"),Object(n.b)("li",{parentName:"ul"},"d0e2d7684 Getter and Setter for hideGenerationTimestamp"),Object(n.b)("li",{parentName:"ul"},"adbde2fb6 replace fromOperation with postProcessOperations"),Object(n.b)("li",{parentName:"ul"},"9d1ae0dd2 fix bigdecimal in default codegen"),Object(n.b)("li",{parentName:"ul"},"ffa0e115d fix default value and type declaration"),Object(n.b)("li",{parentName:"ul"},"0e744adb8 Apply collection format to SIMPLE enum style"),Object(n.b)("li",{parentName:"ul"},"36ed29852 Tweak tests according to the parameter order changes"),Object(n.b)("li",{parentName:"ul"},"17b082793 Move 'enum_query_double' to parameters section"),Object(n.b)("li",{parentName:"ul"},"28fcf48f4 Add a method returns discriminator name"),Object(n.b)("li",{parentName:"ul"},"7daa2ec5d Fix broken discriminator"),Object(n.b)("li",{parentName:"ul"},"faa901640 Replace with the helper function: ",Object(n.b)("inlineCode",{parentName:"li"},"getTypeDeclaration")),Object(n.b)("li",{parentName:"ul"},"c8650d0e3 Make optional properties in models optional parameters"),Object(n.b)("li",{parentName:"ul"},"40c30dd2f Fix inputSpec for multi module builds"),Object(n.b)("li",{parentName:"ul"},"5326152cc add option to reorder form/body parameter"),Object(n.b)("li",{parentName:"ul"},"d1850091a Improve JMeter Template"),Object(n.b)("li",{parentName:"ul"},"fedfb0cda Factorize addOption/addSwitch method"),Object(n.b)("li",{parentName:"ul"},"e73eeb4fd fix for stripping prefix on single enums"),Object(n.b)("li",{parentName:"ul"},"13e3db59e Add operationIdOriginal to store the original operationId"),Object(n.b)("li",{parentName:"ul"},"0b2d80569 Expose getter/setter for serverPort to facilitate testing"),Object(n.b)("li",{parentName:"ul"},"8e270f465 add vendorExtensions field in CodegenSecurity class"),Object(n.b)("li",{parentName:"ul"},"1ee85de94 Added Intelli J ignore"),Object(n.b)("li",{parentName:"ul"},"7b8e409cf Added gitignore generation function")))}m.isMDXComponent=!0},312:function(e,a,t){"use strict";t.d(a,"a",(function(){return o})),t.d(a,"b",(function(){return j}));var r=t(0),b=t.n(r);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var a=1;a=0||(b[t]=e[t]);return b}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(b[t]=e[t])}return b}var c=b.a.createContext({}),m=function(e){var a=b.a.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):l({},a,{},e)),t},o=function(e){var a=m(e.components);return b.a.createElement(c.Provider,{value:a},e.children)},d={inlineCode:"code",wrapper:function(e){var a=e.children;return b.a.createElement(b.a.Fragment,{},a)}},s=Object(r.forwardRef)((function(e,a){var t=e.components,r=e.mdxType,n=e.originalType,i=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),o=m(t),s=r,j=o["".concat(i,".").concat(s)]||o[s]||d[s]||n;return t?b.a.createElement(j,l({ref:a},c,{components:t})):b.a.createElement(j,l({ref:a},c))}));function j(e,a){var t=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var n=t.length,i=new Array(n);i[0]=s;var l={};for(var p in a)hasOwnProperty.call(a,p)&&(l[p]=a[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=i.a.createContext({}),p=function(e){var t=i.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return i.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,a=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),b=r,m=u["".concat(a,".").concat(b)]||u[b]||d[b]||o;return n?i.a.createElement(m,c({ref:t},s,{components:n})):i.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,a=new Array(o);a[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var s=2;s=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=i.a.createContext({}),p=function(e){var t=i.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return i.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},b=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,a=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),b=r,m=u["".concat(a,".").concat(b)]||u[b]||d[b]||o;return n?i.a.createElement(m,c({ref:t},s,{components:n})):i.a.createElement(m,c({ref:t},s))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,a=new Array(o);a[0]=b;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,a[1]=c;for(var s=2;s - + - + diff --git a/main.9e815ea7.js b/main.14532dbf.js similarity index 95% rename from main.9e815ea7.js rename to main.14532dbf.js index 41c5f9cb0c2..3122f62cc5a 100644 --- a/main.9e815ea7.js +++ b/main.14532dbf.js @@ -1,2 +1,2 @@ -/*! For license information please see main.9e815ea7.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[183],[function(e,t,n){"use strict";e.exports=n(77)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;f--){var d=i[f];"."===d?a(i,f):".."===d?(a(i,f),p++):p&&(a(i,f),p--)}if(!s)for(;p--;p)i.unshift("..");!s||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=c(t),o=c(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(4);function u(e){return"/"===e.charAt(0)?e:"/"+e}function p(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function h(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=Object(r.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(c){throw c instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):c}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),p({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=h(e,t,f(),w.location);u.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,p({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(24),o=n(53);e.exports=n(11)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(20)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(5),o=n(10),a=n(28),i=n(40)("src"),c=n(85),l=(""+c).split("toString");n(13).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(a(n,i)||o(n,i,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[i]||c.call(this)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(3),o=n(1),a=n(0),i=n.n(a);function c(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?Object(r.f)(t,e):n.length?n[n.length-1].match:r.c.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&c(e.routes,t,n)),o})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?i.a.createElement(r.d,n,e.map((function(e,n){return i.a.createElement(r.b,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(o.a)({},n,{},t,{route:e})):i.a.createElement(e.component,Object(o.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){var r=n(5),o=n(13),a=n(10),i=n(14),c=n(29),l=function(e,t,n){var s,u,p,f,d=e&l.F,m=e&l.G,h=e&l.S,g=e&l.P,v=e&l.B,b=m?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,y=m?o:o[t]||(o[t]={}),w=y.prototype||(y.prototype={});for(s in m&&(n=t),n)p=((u=!d&&b&&void 0!==b[s])?b:n)[s],f=v&&u?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,b&&i(b,s,p,e&l.U),y[s]!=p&&a(y,s,f),g&&w[s]!=p&&(w[s]=p)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";var r=n(73),o=n(86),a=n(21),i=n(30);e.exports=n(54)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(27),o={};o[n(2)("toStringTag")]="z",o+""!="[object z]"&&n(14)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports={}},function(e,t,n){e.exports=n(98)()},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(8),o=n(83),a=n(84),i=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){for(var r=n(17),o=n(31),a=n(14),i=n(5),c=n(10),l=n(21),s=n(2),u=s("iterator"),p=s("toStringTag"),f=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=o(d),h=0;h
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var l=n.render(!t),s=l.querySelector(r.barSelector),u=r.speed,p=r.easing;return l.offsetWidth,i((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(s,function(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}(e,u,p)),1===e?(c(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout((function(){c(l,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),u!=document.body&&s(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,o,a=arguments;if(2==a.length)for(n in t)void 0!==(o=t[n])&&t.hasOwnProperty(n)&&r(e,n,o);else r(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function u(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return w}));var r=n(3);n.d(t,"c",(function(){return r.a})),n.d(t,"d",(function(){return r.f})),n.d(t,"e",(function(){return r.g}));var o=n(6),a=n(0),i=n.n(a),c=n(7),l=(n(22),n(1)),s=n(9),u=n(4),p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},,function(e,t,n){var r=n(13),o=n(5),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r,o,a=n(81),i=RegExp.prototype.exec,c=String.prototype.replace,l=i,s=(r=/a/,o=/b*/g,i.call(r,"a"),i.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(s||u)&&(l=function(e){var t,n,r,o,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",a.call(l))),s&&(t=l.lastIndex),r=i.call(l,e),s&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),u&&r&&r.length>1&&c.call(r[0],n,(function(){for(o=1;oa;)i(n[a++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(l,(function(){var t,n,r,o=e._v,a=z(e);if(a&&(t=w((function(){P?T.emit("unhandledRejection",o,e):(n=l.onunhandledrejection)?n({promise:e,reason:o}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=P||z(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},z=function(e){return 1!==e._h&&0===(e._a||e._c).length},I=function(e){v.call(l,(function(){var t;P?T.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},A=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},U=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=N(e))?b((function(){var r={_w:n,_d:!1};try{t.call(e,s(U,r,1),s(A,r,1))}catch(o){A.call(r,o)}})):(n._v=e,n._s=1,M(n,!1))}catch(r){A.call({_w:n,_d:!1},r)}}};L||(C=function(e){m(this,C,"Promise","_h"),d(e),r.call(this);try{e(s(U,this,1),s(A,this,1))}catch(t){A.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(114)(C.prototype,{then:function(e,t){var n=O(g(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=P?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=s(U,e,1),this.reject=s(A,e,1)},y.f=O=function(e){return e===C||e===i?new a(e):o(e)}),p(p.G+p.W+p.F*!L,{Promise:C}),n(44)(C,"Promise"),n(115)("Promise"),i=n(13).Promise,p(p.S+p.F*!L,"Promise",{reject:function(e){var t=O(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(c||!L),"Promise",{resolve:function(e){return k(c&&this===i?C:this,e)}}),p(p.S+p.F*!(L&&n(116)((function(e){C.all(e).catch(j)}))),"Promise",{all:function(e){var t=this,n=O(t),r=n.resolve,o=n.reject,a=w((function(){var n=[],a=0,i=1;h(e,!1,(function(e){var c=a++,l=!1;n.push(void 0),i++,t.resolve(e).then((function(e){l||(l=!0,n[c]=e,--i||r(n))}),o)})),--i||r(n)}));return a.e&&o(a.v),n.promise},race:function(e){var t=this,n=O(t),r=n.reject,o=w((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(e,t,n){var r=n(8),o=n(26),a=n(2)("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||null==(n=r(i)[a])?t:o(n)}},function(e,t,n){var r=n(36),o=n(23);e.exports=function(e){return function(t,n){var a,i,c=String(o(t)),l=r(n),s=c.length;return l<0||l>=s?e?"":void 0:(a=c.charCodeAt(l))<55296||a>56319||l+1===s||(i=c.charCodeAt(l+1))<56320||i>57343?e?c.charAt(l):a:e?c.slice(l,l+2):i-56320+(a-55296<<10)+65536}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(39),o=n(16),a=n(14),i=n(10),c=n(21),l=n(88),s=n(44),u=n(93),p=n(2)("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,m,h,g,v){l(n,t,m);var b,y,w,x=function(e){if(!f&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",E="values"==h,T=!1,S=e.prototype,_=S[p]||S["@@iterator"]||h&&S[h],C=_||x(h),P=h?E?x("entries"):C:void 0,j="Array"==t&&S.entries||_;if(j&&(w=u(j.call(new e)))!==Object.prototype&&w.next&&(s(w,k,!0),r||"function"==typeof w[p]||i(w,p,d)),E&&_&&"values"!==_.name&&(T=!0,C=function(){return _.call(this)}),r&&!v||!f&&!T&&S[p]||i(S,p,C),c[t]=C,c[k]=d,h)if(b={values:E?C:x("values"),keys:g?C:x("keys"),entries:P},v)for(y in b)y in S||a(S,y,b[y]);else o(o.P+o.F*(f||T),t,b);return b}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(5).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(49),o=n(31);n(94)("keys",(function(){return function(e){return o(r(e))}}))},function(e,t,n){"use strict";var r=n(15);t.a=r.b},function(e,t,n){"use strict";e.exports=n(101)},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext({})},function(e,t,n){"use strict";n.r(t),t.default="undefined"==typeof window?null:{onRouteUpdate:function(e){var t=e.location;window.ga("set","page",t.pathname),window.ga("send","pageview")}}},function(e,t,n){var r,o,a,i=n(29),c=n(109),l=n(56),s=n(42),u=n(5),p=u.process,f=u.setImmediate,d=u.clearImmediate,m=u.MessageChannel,h=u.Dispatch,g=0,v={},b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){b.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++g]=function(){c("function"==typeof e?e:Function(e),t)},r(g),g},d=function(e){delete v[e]},"process"==n(19)(p)?r=function(e){p.nextTick(i(b,e,1))}:h&&h.now?r=function(e){h.now(i(b,e,1))}:m?(a=(o=new m).port2,o.port1.onmessage=y,r=i(a.postMessage,a,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):r="onreadystatechange"in s("script")?function(e){l.appendChild(s("script")).onreadystatechange=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(i(b,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){"use strict";var r=n(26);function o(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(78)},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(67))},function(e,t,n){"use strict";var r=n(59),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var i=u(n);p&&(i=i.concat(p(n)));for(var c=l(t),h=l(n),g=0;g1||"".split(/.?/).length?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var a,i,c,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,d=void 0===t?4294967295:t>>>0,m=new RegExp(e.source,u+"g");(a=s.call(m,o))&&!((i=m.lastIndex)>p&&(l.push(o.slice(p,a.index)),a.length>1&&a.index=d));)m.lastIndex===a.index&&m.lastIndex++;return p===o.length?!c&&m.test("")||l.push(""):l.push(o.slice(p)),l.length>d?l.slice(0,d):l}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,o,r):m.call(String(o),n,r)},function(e,t){var r=u(m,e,this,t,m!==n);if(r.done)return r.value;var s=o(e),f=String(this),h=a(s,RegExp),g=s.unicode,v=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(d?"y":"g"),b=new h(d?s:"^(?:"+s.source+")",v),y=void 0===t?4294967295:t>>>0;if(0===y)return[];if(0===f.length)return null===l(b,f)?[f]:[];for(var w=0,x=0,k=[];x")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),d=!a((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),m=d?!a((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[f](""),!t})):void 0;if(!d||!m||"replace"===e&&!u||"split"===e&&!p){var h=/./[f],g=n(i,f,""[e],(function(e,t,n,r,o){return t.exec===l?d&&!o?{done:!0,value:h.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=g[0],b=g[1];r(String.prototype,e,v),o(RegExp.prototype,f,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},function(e,t,n){var r=n(12),o=n(19),a=n(2)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(2)("unscopables"),o=Array.prototype;null==o[r]&&n(10)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){var r=n(30),o=n(35),a=n(92);e.exports=function(e){return function(t,n,i){var c,l=r(t),s=o(l.length),u=a(i,s);if(e&&n!=n){for(;s>u;)if((c=l[u++])!=c)return!0}else for(;s>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){"use strict";var r=n(52)(!0);n(54)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){e.exports=n(121)},function(e,t,n){"use strict";var r=n(48),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,c=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113;o&&Symbol.for("react.suspense_list");var m=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116;o&&Symbol.for("react.fundamental"),o&&Symbol.for("react.responder"),o&&Symbol.for("react.scope");var g="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nL.length&&L.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,o){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var l=!1;if(null===t)l=!0;else switch(c){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case a:case i:l=!0}}if(l)return r(o,t,""===n?"."+z(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s
- + - +
-

Who is Using This?

Here are some of our users. To add your company, click "Edit this page" below.

Aalborg UniversityAdaptant Solutions AGadesso SEAgodaAllianzAngular.SchuleANZArduinoASKULb<>com百度营销Banzai CloudBIMData.ioBithost GmbHBosch Connected IndustryBoxeverBunker Holding GroupCalifornia State University, NorthridgeCAMCamptocampCiscocodecentric AGCoinAPICommencisCrossover HealthCupixDatadogDB SystelDocSpringdwangoEdge ImpulseElastic EmailElement AIemineofreeeFenergoFiNC TechnologiesFreshCellsFuseGantnerGetYourGuideGiant Monkey GmbHGMO PepaboGoDaddyGumtreeHereIBMJustStark6.ioKlarnaLinodeKronsoft DevelopmentKubernetesKurusugawa Computer Inc.LVM VersicherungenLumerisM3, Inc.MailSlurpMastercardMédiavisionMetaswitchMoonVisionMyworkoutNamSorNokiaOneSignalOptions Clearing Corporation (OCC)OpenetOPTiMOraclePaxosPLAID, Inc.PlaidPonicodePricefxPrometheus/AlertmanagerQulix SystemsRaksulRaiffeisen Schweiz GenossenschaftRedHatRepreZen API StudioREST UnitedShotstackSmartHRSony Interactive EntertainmentSplititStingraySuvaTelstraThe University of AizuTravelTime platformTribalScaleTUI InfoTec GmbHTwitterunblu inc.VeamlyviadeeVMwareVonageVouchery.iowbt-solutionsWoleetWSO2XeroYahoo! JapanYITU TechnologyYelpZalandoZOZO Technologies
Edit this page
+

Who is Using This?

Here are some of our users. To add your company, click "Edit this page" below.

Aalborg UniversityAdaptant Solutions AGadesso SEAgodaAllianzAngular.SchuleANZArduinoASKULb<>com百度营销Banzai CloudBIMData.ioBithost GmbHBosch Connected IndustryBoxeverBunker Holding GroupCalifornia State University, NorthridgeCAMCamptocampCiscocodecentric AGCoinAPICommencisCrossover HealthCupixDatadogDB SystelDocSpringdwangoEdge ImpulseElastic EmailElement AIemineofreeeFenergoFiNC TechnologiesFreshCellsFuseGantnerGetYourGuideGiant Monkey GmbHGMO PepaboGoDaddyGumtreeHereIBMJustStark6.ioKlarnaLinodeKronsoft DevelopmentKubernetesKurusugawa Computer Inc.LVM VersicherungenLumerisM3, Inc.MailSlurpMastercardMédiavisionMetaswitchMoonVisionMyworkoutNamSorNokiaOneSignalOptions Clearing Corporation (OCC)OpenetOPTiMOraclePaxosPLAID, Inc.PlaidPonicodePricefxPrometheus/AlertmanagerQulix SystemsRaksulRaiffeisen Schweiz GenossenschaftRedHatRepreZen API StudioREST UnitedShotstackSmartHRSony Interactive EntertainmentSplititStingraySuvaTelstraTencentThe University of AizuTravelTime platformTribalScaleTUI InfoTec GmbHTwitterunblu inc.VeamlyviadeeVMwareVonageVouchery.iowbt-solutionsWoleetWSO2XeroYahoo! JapanYITU TechnologyYelpZalandoZOZO Technologies
Edit this page