Update OpenAPI 3.0 schema URI
This commit is contained in:
parent
dec3c67e87
commit
4dde683358
3 changed files with 73 additions and 73 deletions
|
@ -88,7 +88,7 @@ impl SchemaSettings {
|
|||
option_add_null_type: false,
|
||||
definitions_path: "#/components/schemas/".to_owned(),
|
||||
meta_schema: Some(
|
||||
"https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema"
|
||||
"https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/Schema"
|
||||
.to_owned(),
|
||||
),
|
||||
visitors: vec![
|
||||
|
|
|
@ -1,58 +1,7 @@
|
|||
{
|
||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/Schema",
|
||||
"title": "MyStruct",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"myInt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"myBool": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"myNullableEnum": {
|
||||
"nullable": true
|
||||
},
|
||||
"myInnerStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"my_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"my_vec": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"my_empty_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"my_empty_vec": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"my_tuple": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "string",
|
||||
"maxLength": 1,
|
||||
"minLength": 1
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
],
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"myBool": true,
|
||||
"myInnerStruct": {
|
||||
|
@ -72,5 +21,56 @@
|
|||
},
|
||||
"myInt": 123,
|
||||
"myNullableEnum": null
|
||||
},
|
||||
"properties": {
|
||||
"myBool": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"myInnerStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"my_empty_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"my_empty_vec": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"my_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"my_tuple": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "string",
|
||||
"maxLength": 1,
|
||||
"minLength": 1
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
],
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"my_vec": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"myInt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"myNullableEnum": {
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +1,8 @@
|
|||
{
|
||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/Schema",
|
||||
"title": "Outer",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"int",
|
||||
"value",
|
||||
"values"
|
||||
],
|
||||
"properties": {
|
||||
"int": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"example": 8
|
||||
},
|
||||
"values": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"value": {},
|
||||
"inner": {
|
||||
"allOf": [
|
||||
{
|
||||
|
@ -25,8 +10,23 @@
|
|||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"int": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"example": 8
|
||||
},
|
||||
"value": {},
|
||||
"values": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"int",
|
||||
"value",
|
||||
"values"
|
||||
],
|
||||
"definitions": {
|
||||
"Inner": {
|
||||
"oneOf": [
|
||||
|
@ -46,13 +46,13 @@
|
|||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ValueNewType"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"ValueNewType": {}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"required": [
|
||||
"ValueNewType"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue