Releases: javalin/javalin-openapi
5.5.0
Changes
- #174 Allow injecting additional css and js files in Swagger UI
- #177 Support @OpenApiNullable
- #181 Support @OpenApiRequired
- #161 Check if WebJarHandler is already registered
- #173 Bumped Javalin to 5.5.0
Sponsors
Also thanks for all sponsors that support my work this month 💜
|
Active @dzikoysk's GitHub Sponsors |
milkyway0308, andrm, insertt, Koressi, zugazagoitia, tipsy, neg4n, mattwelke, Kamilkime, crejk, asikkema Szczurowsky, Rollczi, |
Minimal requirements
- Java 11+ / Kotlin 1.8+
- Javalin 5.5.0
Download
5.4.2
Changes
- #173 Bumped Javalin to 5.4.2
Sponsors
Also thanks for all sponsors that support my work this month 💜
|
Active @dzikoysk's GitHub Sponsors |
milkyway0308, andrm, insertt, Koressi, zugazagoitia, tipsy, neg4n, mattwelke, Kamilkime, crejk, asikkema Szczurowsky, Rollczi, |
Minimal requirements
- Java 11+ / Kotlin 1.8+
- Javalin 5.4.2
Download
5.4.0
Changes
- #156 Support @OpenApiCallback
- #165 Support usage of @Custom annotation on types
- #165 Support @OpenApiDescription
- #167 Support nullability definition in OpenApiPropertyType,
- #168 Expose tagsSorter & operationSorter in Swagger UI configuration
- #158 Fixed wrong way of converting old OpenApi config to the new one (thanks @zrdzn ❤️)
- #152 Support auto-generated operationIds (thanks @sauterl ❤️)
- #150 Log duplicated entities in debug mode
- #149 Fixed groupId in Maven example (thanks @macabrus ❤️)
- Bumped Javalin to 5.4.0 & Kotlin to 1.8
Sponsors
Also thanks for all sponsors that support my work this month 💜
|
Active @dzikoysk's GitHub Sponsors |
milkyway0308, andrm, insertt, Koressi, rdehuyss, zugazagoitia, tipsy, neg4n, mattwelke, Kamilkime, crejk, asikkema |
Minimal requirements
- Java 11+ / Kotlin 1.8+
- Javalin 5.4.0
Download
5.3.2
Changes
- #147 Support inherited properties
- #147 Adjusted scripting API to the new inheritance model
- #145 Removed @CompileStatic from examples
- Bumped Javalin to 5.3.2
Download
5.3.1
5.3.0
Changes (since 5.2.0)
- GH-116 Reimplemented
OpenApiPluginconfigurationOpenApiConfigurationhas been deprecated and will be no longer developed - Those changes were required to properly address different versions of generated schemes.- GH-118 Implement backwards compatible layer for old OpenApi plugin configuration
- Use
OpenApiPluginConfigurationto configureOpenApiPluginwith a new builder-like API - See updated setup on wiki to check the new approach
- GH-96 Support
@OneOf/@AllOf/@AnyOfon classes - GH-97 Use reusable enums to cover enum values
- GH-111 Hide implementation details of enum classes
- GH-113 Automatically add missing
/to routes - GH-112 Exclude dependencies of ReDoc webjar by default
- GH-95 Add error location to the missing mime type warning
- GH-122 Support
@OpenApiNameon classes - GH-123 Fix invalid info object serialization in OpenApiPlugin
- GH-121 Preserve declared order of parameters
- GH-124 Remove generic type signature from TypeMirror names
- GH-125 Sort routes by name, not enum's ordinal number
- GH-128 Keep OpenApi & JsonSchema annotations in compiled sources
- GH-128 Make OpenApi & JsonSchema annotations visible in runtime
- GH-129 Support discriminator in composition annotations
- GH-130 Support custom base path in Swagger plugin
- GH-129 Support
@OpenApiNamein composition API - GH-129 Support injection of discriminator property
- GH-132 Support custom base path in ReDoc plugin
- GH-141 Support IntelliJ's
ProcessingEnvironment - GH-137 Render global security as array
- GH-143 Generate missing schemes for listed composition references
- GH-127 Support compile-time Groovy script to preconfigure annotation processor (Experimental API)
- Script should be defined in
src/main/compile/openapi.groovyfile - GH-125 Support enhanced debug logging
- Script should be defined in
@ExperimentalCompileOpenApiConfiguration
class OpenApiConfiguration implements OpenApiAnnotationProcessorConfigurer {
@Override
void configure(OpenApiAnnotationProcessorConfiguration openApiAnnotationProcessorConfiguration) {
// enable extra debug logging
openApiAnnotationProcessorConfiguration.debug = true
}
}- GH-125 Print in debug mode all annotations on element with usage and its implementation
- GH-80 Expose simple types in scripting API
@ExperimentalCompileOpenApiConfiguration
class OpenApiConfiguration implements OpenApiAnnotationProcessorConfigurer {
@Override
void configure(OpenApiAnnotationProcessorConfiguration openApiAnnotationProcessorConfiguration) {
// represents all `CustomType` usages as strings in OpenApi specification
configuration.simpleTypeMappings['io.javalin.openapi.processor.TypeMappersTest.CustomType'] = new SimpleType("string")
}
}- GH-108 Extend experimental scripting API with a possibility to filter specific properties from schemes
@ExperimentalCompileOpenApiConfiguration
class OpenApiConfiguration implements OpenApiAnnotationProcessorConfigurer {
@Override
void configure(OpenApiAnnotationProcessorConfiguration openApiAnnotationProcessorConfiguration) {
// example of custom property filter to exclude/include given element in class scheme
configuration.propertyInSchemeFilter = { AnnotationProcessorContext ctx, ClassDefinition type, Element property ->
TypeElement specificRecord = ctx.forTypeElement('io.javalin.openapi.processor.UserCasesTest.SpecificRecord')
if (ctx.isAssignable(type.mirror, specificRecord.asType())) {
return !ctx.hasElement(specificRecord, property)
}
return true
}
}
}- GH-133 Support custom type mappings
@ExperimentalCompileOpenApiConfiguration
class OpenApiConfiguration implements OpenApiAnnotationProcessorConfigurer {
@Override
void configure(OpenApiAnnotationProcessorConfiguration openApiAnnotationProcessorConfiguration) {
// resolves all usages of Option<T> signatures to T reference
configuration.insertEmbeddedTypeProcessor({ EmbeddedTypeProcessorContext context ->
if (context.type.simpleName == 'Optional' && context.type.generics.size() == 1) {
context.parentContext.typeSchemaGenerator.addType(context.scheme, context.type.generics[0], context.inlineRefs, context.references, false)
return true
}
return false
})
}
}Download
5.3.0-alpha.7
This is alpha build
API may be changed between alpha builds to properly form its final shape in the official release.
Changes
Download
5.3.0-alpha.6
This is alpha build
API may be changed between alpha builds to properly form its final shape in the official release.
Changes
Download
5.3.0-alpha.5
This is alpha build
API may be changed between alpha builds to properly form its final shape in the official release.
Changes
- #125 Sort routes by name, not enum ordinal number
- #128 Keep OpenApi & JsonSchema annotations in compiled sources
- #80 Expose simple types in scripting API
- #129 Support discriminator in composition annotations
- #130 Support custom base path in Swagger plugin
- #129 Support @OpenApiName in composition API
Download
5.3.0-alpha.4
This is alpha build
API may be changed between alpha builds to properly form its final shape in the official release.
Changes
- GH-127 Support compile-time Groovy script to preconfigure annotation processor (Experimental API)
- GH-125 Add debug logging to custom annotation mapper
- GH-108 Extend experimental scripting API with a possibility to filter specific properties from schemes
- GH-125 Print in debug mode all annotations on element with usage and its implementation
- Script should be defined in
src/main/compile/openapi.groovyfile as follows:
import groovy.transform.CompileStatic
import io.javalin.openapi.experimental.ExperimentalCompileOpenApiConfiguration
import io.javalin.openapi.experimental.OpenApiAnnotationProcessorConfiguration
import io.javalin.openapi.experimental.OpenApiAnnotationProcessorConfigurer
@CompileStatic
@ExperimentalCompileOpenApiConfiguration
class OpenApiConfiguration implements OpenApiAnnotationProcessorConfigurer {
@Override
void configure(OpenApiAnnotationProcessorConfiguration openApiAnnotationProcessorConfiguration) {
// enable extra debug logging
openApiAnnotationProcessorConfiguration.debug = true
// example of custom property filter to exclude/include given element in class scheme
configuration.propertyInSchemeFilter = { AnnotationProcessorContext ctx, ClassDefinition type, Element property ->
TypeElement specificRecord = ctx.forTypeElement('io.javalin.openapi.processor.UserCasesTest.SpecificRecord')
if (ctx.isAssignable(type.mirror, specificRecord.asType())) {
return !ctx.hasElement(specificRecord, property)
}
return true
}
}
}- GH-124 Remove generic type signature from TypeMirror names
Download