Changelog - SMILEY4/ktor-openapi-tools GitHub Wiki
- add default kotlinx example encoder
- add
ignoredRouteSelectorClassNames
in case class to ignore is not public (#149) - upgrade schema-kenerator from 1.5.0 to 1.6.0
- add
@KtorDsl
annotation on documented routes - fixed: default security schema did not correctly use components section
- fixed documented resource routes (#153)
- upgrade ktor to 3.0.0 (#140)
- removed unnecessary ktor Webjars plugin
- support location "cookies" for request parameters
- option to serve api-spec as yaml instead of json
install(SwaggerUI) { outputFormat = OutputFormat.YAML }
- fix bug: additional slashes in routes caused parts of url being dropped
- upgrade schema kenerator from 1.4.3 to 1.5.0
- bump versions of some dependencies
- properly render openapi-spec as 3.1.0
- upgrade schema-kenerator from 1.4.1 to 1.4.3
- upgrade ktor from 2.3.11 to 2.3.12
- upgrade schema-kenerator to version 1.4.1
- fixed: incorrect http-status-code format in responses object
- fixed: "ktor.deployment.rootPath" is included in paths
- upgrade schema-kenerator to version 1.2.2
- removed some openapi fields with default values in the generated spec that are usually optional (this resulted in some invalid schemas before)
- upgrade schema-kenerator to version 1.1.1
- upgrade schema-kenerator from 1.0.1 to 1.1.0
- path-parameters are not "required" by default
- fixed issue with config merging, resulting in some plugin config changes to be ignored or having no effect
- fixed bug: security examples not generated with correct type
- quality of life improvements to dsl
- add option to customize schema encoding
- fixed body of defaultUnauthorizedResponse
- upgraded schema-kenerator from 1.0.0 to 1.0.1
- fixd bug: routes with same "url" not added to spec when rootHost-path is configured
- improved default schema-generator configuration
- improved documentation
Changes from 3.0.0-beta1
-
reworked schema and example handling; replaced previously used json schema generator with https://github.com/SMILEY4/schema-kenerator this switch should result in more predictable behavior, cleaner schemas in the spec and allow for more flexibility and better support for future features and bugfixes specific to the ktor-swagger-ui plugin
-
dropped automatic swagger-ui routing. Routes for swagger-ui and the openapi-file have to be added manually at the desired url this change should make the routing of the ui and spec more visible and intuitive while also allowing for easier customization of the routes
-
cleaned up plugin-configuration and openapi-dsl removed no longer necessary configuration and cleaned up existing groups making the plugin config a bit cleaner
-
examples are no longer part of the tests and have been moved to an own subproject. Reworked examples to better showcase functionalities.
Changes from 3.0.0-beta2
- improved (added back) proper dsl for schemas and examples
- upgraded to schema-kenerator version 0.2.0 (https://github.com/SMILEY4/schema-kenerator/releases/tag/0.2.0)
Changes from 3.0.0-beta3
- add option to disable syntax highlighting (
SwaggerUiSyntaxHighlight#DISABLED
) - upgrade schema-kenerator to version 0.4.0 (https://github.com/SMILEY4/schema-kenerator/releases/tag/0.4.0)
- uprade swagger-ui webjars to version 5.17.11
- upgrade to openapi version 3.1.0 and add support for more properties
- added
info.summary
- added
license.identifier
- added
server.variables
- added
header.explode
- added
parameter.style
- added
route.externalDocs
,route.servers
- added
- fix: swagger routing config
- ktor.deployment.rootPath is appended to paths in openapi.json
- added option to manually configure routing for swagger-ui and api-spec-json
- added (back) jackson-module - results in jackson annotation and sub-types being detected automatically again
- add hook whenBuildOpenApiSpecs to process/customize final api-content after openapi-generation generation
- add withCredentials (see https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration)
- bump victools/jsonschema-generator to 4.33+ and include Option.INLINE_NULLABLE_SCHEMAS
- fix bug: incorrect handling of rootHostPath
- change name of AuthScheme#BEARER from "Bearer" to "bearer"
- bump ktor version to 2.3.7
- bump swagger-parser version to 2.1.19
- fix bug: invalid property "name" in security schemes
- fix: displayed routes using the resources-plugin contained parameters in the url
- upgraded dependency versions
- fixed: missing properties that start with 'is[A-Z]' https://github.com/SMILEY4/ktor-swagger-ui/issues/60
- allow for multiple openapi-specs and swagger-uis
- simpler request and response-body schema customization (oneOf, multipleOf, custom)
- add support for type-safe routes / resources-plugin
- add support for external documentation
- fix bug: schemas with wildcard generics (e.g. Array<*>) throw exception
- add
rootHostPath
to plugin-config for improved support for reverse-proxies - add
customSchemas.includeAll
to plugin-config to also include custom schemas that are not directly references by any route - add github actions to automatically run tests and-code style-checks
- fix bug: schema for file-uploads not generated correctly
- fix bug: Schema-annotation with "nullable = true" breaks schema generation
- fixed a bug where the component name of schemas of inner array elements was wrong
- publish to maven central
- add flag
protected
to route-documentation to overwrite default behaviour, i.e. manually mark route as protected or not
- improved automatic schema handling
- changes in plugin-configuration
- removed
canonicalNameObjectRefs
,schemasInComponentSection
,examplesInComponentSection
,jsonSchemaBuilder
- replaced
automaticTagGenerator
withgenerateTags
- added
encoding
-section
- removed
- schema and example generation process more extendable (via
encoding
-config section) allowing for simpler integration of other schema-generators and json-serializers (e.g. supporting kotlinx and multiplatform) - see KotlinxExample.kt - print exceptions thrown during api generation
- upgrade swagger parser to 2.1.13 due to vulnerabilities
- add
@Example
-Annotation to add example values directly on fields of the model - support for (some features of) the openapi-core
@Schema
-Annotation
- added "hidden"-flag to not include routes in openapi-spec
- add (basic) support for swagger @Schema-annotation to add more information (mainly description, title, required, nullable) to schemas/fields
- fix bug: primitive body types (int, float, ...) default to type "string" when specified via generics
- fix bug: example values for parameters could not be set and were mixed up with the "explode"-option
- allow multiple security schemes per route
- add config (
ignoredRouteSelectors
) to ignore specific ktor route-selectors - enable usage of custom object schemas as object or array
- add option to mark routes as deprecated
- bugfix: changed
canonicalNameObjectRefs
in plugin-config from val to var
- fix bug: changed canonicalNameObjectRefs to var in plugin-config
- use simpleName instead of canonicalName for objects by default, can be configured via
canonicalNameObjectRefs
- upgrade to ktor 2.2.2
- bugfix: fixed "operationsSorter"-value
- fix bug: json-schemas for maps were not generated correctly
- exclude documented-route from route-string
🥳
- make json-schema-generator configurable
- upgrade to ktor 2.2.1
- add (basic) support for multipart-bodies
- add additional configuration-options for swagger-ui
- fix: add missing enum mapping for schemas
- added support for custom predefined schemas
- added support for custom json-schema-builders
- fixed bug: configured rootPath (in application.conf) not respected
- fixed bug: security scheme not added to openapi-spec
- add
@DslMarker
for more safety - protect Swagger-UI and OpenApi-json with custom authentication
- improved/proper support for generics in schemas (e.g.
body<MyResponse>()
as alternative tobody(MyResponse::class)
) - support external json-schemas for bodies
- support for default responses and responses for custom status-codes
- support
operationId