Config Options for javascript-apollo

OptionDescriptionValuesDefault
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
apiPackagepackage for generated api classesnull
emitJSDocgenerate JSDoc commentstrue
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
hideGenerationTimestampHides the generation timestamp when files are generated.true
invokerPackageroot package for generated codenull
legacyDiscriminatorBehaviorThis flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName.

When this flag is set to 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.

  • Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing. When this flag is set to true:

  • The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document. Note to developers supporting a language generator in OpenAPITools: to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.| |true| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| |projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| |projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src| |useInheritance|use JavaScript prototype chains & delegation for inheritance| |true|

IMPORT MAPPING

Type/AliasImports

INSTANTIATION TYPES

Type/AliasInstantiated By
arrayArray
listArray
mapObject

LANGUAGE PRIMITIVES

  • Array
  • Blob
  • Boolean
  • Date
  • File
  • Number
  • Object
  • String

RESERVED WORDS

  • abstract
  • arguments
  • array
  • boolean
  • break
  • byte
  • case
  • catch
  • char
  • class
  • const
  • continue
  • date
  • debugger
  • default
  • delete
  • do
  • double
  • else
  • enum
  • eval
  • export
  • extends
  • false
  • final
  • finally
  • float
  • for
  • function
  • goto
  • hasownproperty
  • if
  • implements
  • import
  • in
  • infinity
  • instanceof
  • int
  • interface
  • isfinite
  • isnan
  • isprototypeof
  • let
  • long
  • math
  • nan
  • native
  • new
  • null
  • number
  • object
  • package
  • private
  • protected
  • prototype
  • public
  • return
  • short
  • static
  • string
  • super
  • switch
  • synchronized
  • this
  • throw
  • throws
  • tostring
  • transient
  • true
  • try
  • typeof
  • undefined
  • valueof
  • var
  • void
  • volatile
  • while
  • with
  • yield

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension

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 Justin Black