-
Notifications
You must be signed in to change notification settings - Fork 27
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
(automated) quality checks #27
Comments
just a hint for working locally: you can mount your local checkout and run speccy against that:
|
https://engineering.wework.com/our-api-specification-workflow-9337448d6ee6 This in an interesting medium post about wework's API development/CI workflow - might be useful |
Note that natively speccy complains about some JSON-Schema constructs, such as "$schema". That is supposed to be fixed in a later version of OpenAPI, but in the meantime you'll probably have seen you can use the -j switch with speccy to address this (apparently - I haven't tested it myself). |
You can also do that directly in GitHub by creating "Action" for ICAR repo. Simpest one would be create action with such workflow:
This will trigger automatic validation on each push commit |
I have added this validation to /.github/workflows in Master. At the moment it is failing until an error is corrected in icarConsignmentType.json. I have submitted a patch pull request to fix this. |
Error has been corrected, and the Speccy validation now works. Noted that we may wish to consider a change to Stoplight.io in future as Speccy is not being maintained and future changes to the JSON Schema specification might break the validation. |
As the pull request from @Jongmassey has shown, it is easy for errors to slip in. Right now, we more or less have a set of static files and rely on manual checking.
We should have an environment where we can build the documentation and also perform automated quality checks. For example, running
docker run wework/speccy lint https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/exampleUrlScheme.yaml
(on a workstation with Docker installed), will give detailed feedback on things that need improving.
The text was updated successfully, but these errors were encountered: