-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid Syntax in beaconErrorResponse.yaml
#135
Comments
Hi Daniel, Here is where discussion starts to get interesting... |
Hi Jordi, It seems that all endpoints have a default:
description: An unsuccessful operation
$ref: ./responses/beaconErrorResponse.yaml Which leads to the I'm not sure in what ways this schema is used outside of OpenAPI, as you mentioned. Are there other tools/frameworks that use these files or are you referring to manually creating a Beacon implementation from the schema? Would be great to get some context so I could better address the concern. |
"All" the schemas are used in validating responses by Json validators. |
@jrambla I see, so if it's important to keep the structure of the file responses:
'200':
...
default:
description: An unsuccessful operation.
$ref: ./responses/beaconErrorResponse.yaml It will be: responses:
'200':
...
default:
description: An unsuccessful operation.
content:
application/json:
schema:
$ref: ./responses/beaconErrorResponse.yaml One thing to note is that this fix will be needed in all the endpoints that reference the error response, in the framework and model parts, which amounts to about ~60 instances. Would this be a better approach? |
As Michael and myself said: editing the |
The file
beaconErrorResponse.yaml
contains invalid OpenAPI syntax.Existing Syntax:
Corrected Syntax:
As this file is a response definition, it should be defined as a
response
object in the OpenAPI specification. The correct syntax should be:Reference:
OpenAPI Specification - Describing Responses
Note:
After fixing the
.yaml
files, the.json
should be fixed as well by running the schema conversion script located in the bin folder.The text was updated successfully, but these errors were encountered: