7.0.0 Release Notes
glennjones opened this issue · 1 comments
glennjones commented
Breaking Changes
swaggerUI
the optionenableSwaggerUI
has been renamed toswaggerUI
documentationPage
the optionenableDocumentation
has been renamed todocumentationPage
- Swagger output has changed format, more elements will now be in the definition section of the JSON. In general this should not change the SwaggerUI rendering, but may impact people using the plugin for codegen
- Response object automatic naming now uses the common format
Model 1
etc rather than the older formatresponse_postStore_404
- Allows for greater reuse of models and reduces library code.
New
- Support for empty JOI objects i.e.
payload: Joi.object()
- Support for Joi.string().regex(/^[a-zA-Z0-9]{3,30}/)
- The readme has been split into a couple of new documents
Options Reference
andUsage Guide
New Options
xProperties
: Adds JOI data that cannot be use directly by swagger as metadata - default:true
reuseDefinitions
: Reuse of definition models to save space - default:true
deReference
: Dereferences JSON output - default:false
debug
: Validates the JSON ouput against swagger specification and logs issues - default:false
Notes
- Path parameters
/{param}
and/{param?}
will have theirrequired
status set automatically, but can be overriden byJoi.required()
andJoi.optionsl()
. - Path parameters
/{param}
and/{param?}
set with asoptional
will be logged with warning about swagger specification validation issues. x-alternatives
in parameters moved to same level asschema
. This is to match now otherx-
properties are treated in the JSON output- The meta property
example
for the response object has been renamed toexamples
so coderesponse....meta({'example': JoiObj})
would becomeresponse....meta({'examples': JoiObj})
this fixes a swagger validation issue.
jsumners commented
documentationPage the option enableDocumentation has been renamed to enableDocumentation
should be
documentationPage the option enableDocumentation has been renamed to documentationPage