-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Swagger/OpenAPI: Syntax error in /system/logs and LogEntry definition #1287
Comments
Thank you for finding this. I can't think how we let this error slip through, but I've notified the author based upon spectral appears to be a JavaScript tool and I would rather not having to mandate Node.js for development of OpenFaaS, so can we run it in a Docker container perhaps? If you are happy to fix the error in the Swagger I will be standing by to merge it. Thank you again for picking this up. Alex |
Will do. Regarding the linter: It's quite easy to run the linter in docker as there is an official docker image from Stoplight. Basically it would work like this: docker run -it --rm -v "$APIDOC_DIR":"$APIDOC_DIR" stoplight/spectral lint "$APIDOC_DIR/swagger.yml" The return code will be non-zero in case of errors, I haven't tried yet if warnings lead to non-zero exit code as well, but would hope not. |
As you can see I have opened an MR for the api docs. I would open a second one for the linter if I get around to understand how the |
I had a look into the OpenAPI linter "spectral" but it seems like warnings cause the same non-zero exit code (1) as errors and there is an open issue for this in spectral: stoplightio/spectral#368 Two options: |
@nichochen can this be closed now? |
The issue has been resolved. |
My actions before raising this issue
Expected Behaviour
When following the instructions as described in https://github.com/openfaas/faas/tree/master/api-docs, the Swagger Editor should render the API documentation without errors
Current Behaviour
Swagger editor shows this message:
Possible Solution
Fix the indentation in the description of the
/system/logs
endpoint and renameproperty
toproperties
in theLogEntry
definitionSteps to Reproduce (for bugs)
Additional ideas of improvement
operationId
) as well.The text was updated successfully, but these errors were encountered: