-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Given the following schema file schema-v1.json
{
"openapi": "3.0.0",
"info": {
"title": "Animal API",
"version": "1.0.0",
"description": "API for managing animal types"
},
"paths": {
"/basic-request": {
"post": {
"summary": "Create an animal request",
"requestBody": {
"description": "Empty request body",
"content": {
"application/json": {
"schema": {}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"animalType": {
"type": "string",
"enum": ["Cat", "Dog", "Mouse"]
}
}
}
}
}
}
}
}
}
}
}When I run
docker run --rm -v C:\temp\:/data:rw typeable/comparest --client /data/schema-v1.json --server /data/schema-v1.json --output /data/report.md
It crashes with the following
compaREST: user error (Exiting)
Could not parse as json or yaml
"Error in $: key \"components\" not found"
AesonException "Error in $: key \"components\" not found"
According to the docs, it's sufficent for the schema to only have paths:
A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. An OpenAPI document uses and conforms to the OpenAPI Specification
Metadata
Metadata
Assignees
Labels
No labels