This module generates the json-schema for all Springwolf detected schemas (payloads, headers, etc.).
No configuration needed, only add the dependency.
As Springwolf uses swagger-parser to create an OpenApi schema, this module maps the OpenApi schema to json-schema.
Add the following dependency:
dependencies {
runtimeOnly 'io.github.springwolf:springwolf-json-schema:<springwolf-version>'
}The x-json-schema field is added for each Schema.
Example:
{
"MonetaryAmount-Header": {
"...": "",
"x-json-schema": {
"$schema": "https://json-schema.org/draft-07/schema#",
"name": "MonetaryAmount-Header",
"properties": {
"__TypeId__": {
"description": "Spring Type Id Header",
"enum": [
"javax.money.MonetaryAmount"
],
"type": "string"
}
},
"type": "object"
}
}
}