You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generated following swagger json from my sample project, however on loading this up on Swagger online editor, it gives following validation errors. Is this a specification mismatch issue or something?
I generated following swagger json from my sample project, however on loading this up on Swagger online editor, it gives following validation errors. Is this a specification mismatch issue or something?
Swagger JSON:
{
"basePath": "/",
"definitions": {
"definition#1": {
"properties": {
"cause": {
"type": "string"
},
"error": {
"type": "string"
},
"errorCode": {
"type": "string"
}
}
},
"definition#2": {
"properties": {
"cause": {
"type": "string"
},
"error": {
"type": "string"
},
"errorCode": {
"type": "string"
}
}
}
},
"host": "example.com",
"info": {
"title": "sample-service",
"version": "1.0.0-SNAPSHOT"
},
"paths": {
"/api/health": {
"get": {
"consumes": [],
"parameters": [],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"headers": {}
}
}
}
},
"/api/v1/
resourceA
": {"post": {
"consumes": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "X-Interface-Name",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "X-ABC-Client-App-ID",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"produces": [],
"responses": {
"204": {
"description": "No Content",
"headers": {}
},
"400": {
"description": "Bad Request",
"headers": {},
"schema": {
"$ref": "definition#1"
}
},
"500": {
"description": "Internal Server Error",
"headers": {},
"schema": {
"$ref": "definition#2"
}
}
}
}
}
},
"schemas": [
"http"
],
"swagger": "2.0"
}
Validation Errors
✖ Swagger Error
Additional properties not allowed: schemas
Details
Object
code: "OBJECT_ADDITIONAL_PROPERTIES"
message: "Additional properties not allowed: schemas"
path: Array [0]
level: 900
The text was updated successfully, but these errors were encountered: