Define & Validate APIs Manage API Definitions Import and Export Settings Settings in the APIMatic Metadata file that change how your API definition is read, and how it's written when you transform it.
Import settings change how APIMatic reads your API definition. Export settings change how it's written when you transform it to another format. Both go at the top level of the APIMatic Metadata file . Set only the ones you want to change; the rest keep their defaults.
src/spec/APIMATIC-META.json {
"ImportSettings" : {
"PreferSwaggerOperationSummaryOverId" : true ,
"ImportMultipleAuthentication" : false
},
"ExportSettings" : {
"ExportExtensions" : true
}
}
All import settings are booleans except ExampleResolvingMaxDepth.
Setting Default What it does PreferJsonSchemaNameOverTitlefalseNames models after their definition name instead of their title. AppendParentNameForClashesfalseWhen two models have the same name, adds the parent's name instead of a number. IgnoreRamlTypeDeclarationDisplayNamefalseRAML 1.0: ignores displayName and uses the declared key name. PreferSwaggerOperationSummaryOverIdfalseOpenAPI: names endpoints from summary instead of operationId. IgnoreEndpointSummaryfalseUses an endpoint's summary as its description when it has no description.
Setting Default What it does ExampleResolvingMaxDepth1Integer. How deep to import models from nested schemas in examples. Lower it if import is slow. AllowModelTypesWithNoFieldsfalseImports models that have no properties. ImportArrayOfMapsAndMapOfArraysfalseImports arrays of maps and maps of arrays with their types, instead of as dynamic types. ImportOpenApi3EmptySchematrueOpenAPI 3: keeps empty schemas. When false, they're treated as undeclared. ImportAdditionalCustomTypeAdditionalFieldstrueImports additionalProperties defined in schemas. RemoveUndeclaredPropertiesFromExamplenot set Removes example properties that aren't in the schema. Turns on automatically with RemoveSchemaPropertiesWithTags unless you set it to false.
Setting Default What it does ImportTypeCombinatorstrueImports oneOf, anyOf, not, and union types along with the extra types they need. ImportTypeCombinatorsWithOnlyOneTypetrueWhen false, a combinator with a single type is replaced by that type. ImportAdditionalTypeCombinatorModelstrueWhen false, skips unused models that come from type combinators. LoadOneOfAsOptionalFieldsfalseMerges oneOf schemas into one model whose fields are all optional. UseRamlUnionTypeAsOneOftrueRAML 1.0: loads union types as oneOf. When false, loads them as anyOf. LoadBaseTypesForOneOfAnyOfDiscriminatorfalseCreates base types where a discriminator is used with oneOf or anyOf. AppendParentSchemaNameToOneOfAnyOfBaseTypefalseAdds the parent schema's name to those generated base types. ImportFromOpenApiDiscriminatorMappingtrueOpenAPI 3: imports the discriminator mapping.
Setting Default What it does IgnoreInlineEnumModelDescriptionfalseIgnores descriptions defined inline on enum schemas. PreserveSingleValueEnumfalseOpenAPI 3.0: keeps single-value enums as enums instead of turning them into constants. AllowAdditionalEnumItemsfalseLets enums accept values that aren't listed.
Setting Default What it does ImportMultipleResponsestrueWhen false, keeps only responses with status codes 200–208 and 400–599, and drops the types the others need. ImportAdditionalErrorModelstrueWhen false, drops the extra error models created for multiple error responses. ImportRequestBodyContentTypeHeadertrueImports the request content type as an explicit Content-Type header. ImportWsdlWithJsonMediaTypesfalseWSDL: treats application/xml media types as JSON and skips XML metadata.
Setting Default What it does ImportMultipleAuthenticationtrueWhen false, imports only the first authentication scheme. ImportAdditionalHeadertrueWhen false, skips the extra header added when several authentication schemes are defined. EnableCookieAuthenticationfalseImports cookie authentication schemes. AllowAuthForEmptySecurityObjectfalseApplies authentication even when an operation's security is empty.
Setting Default What it does UseStrictValidationfalseEnforces all mandatory, recommended, and lint checks.
All export settings are booleans.
Setting Default What it does ExportExtensionsfalseExports extensions when the output format supports them. ExportAnyTypetrueWhen false, exports any as object or string. AddRefSiblingDataInAllOfSchematrueKeeps data that sits next to a $ref by wrapping it in allOf. When false, that data is dropped.
Setting Default What it does ExportXmlMetaDatatrueExports XML metadata such as node name, namespace, and prefix (OpenAPI 2.0, 3.x, RAML 1.0). ExportDiscriminatorMappingValuestrueOpenAPI 3: exports discriminator values in mapping. ExportGlobalTypeCombinatorstrueOpenAPI 3.0 and RAML: defines type combinators once and references them. When false, they're written inline. UseDateTimeOnlyInRamlfalseRAML 1.0: exports date-time fields as datetime-only instead of datetime.
Setting Default What it does GenerateModelSamplestruePostman 1.0 and 2.0: generates sample values for parameters, requests, and responses. Not used for WSDL or WADL input. SetPostmanParamValuesAsVariablesfalsePostman: stores sample query and path parameter values as collection variables. EncodeUrlParamsInPostmantruePostman: URL-encodes request URLs. ExportApiKeyAuthInPostmantruePostman: uses Postman's API key auth type. When false, adds the key as a parameter. UseEnvironmentNamesForServerVariablesfalsePostman: adds environment names to server variable names. ExportOptionalParametersAsDisabledfalsePostman and Insomnia: marks optional parameters as disabled. GenerateSampleValueFromRegexPatternfalsePostman and Insomnia: generates sample values from regex patterns. Off by default because it's slow. ForceAllowModelExampleExportForSampleGenerationfalsePostman and Insomnia: reuses model-level examples for samples.
Setting Default What it does UseHttpMethodPrefixForAutoGeneratedWsdlNamestrueWSDL: prefixes generated names with the HTTP method. UseXsdBase64BinaryTypefalseXML Schema: exports files and binary data as xs:base64Binary instead of xs:hexBinary.