Skip to content
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

check-swagger-sources.py is not run in CI #8

Closed
anoadragon453 opened this issue Feb 9, 2022 · 0 comments · Fixed by #1656
Closed

check-swagger-sources.py is not run in CI #8

anoadragon453 opened this issue Feb 9, 2022 · 0 comments · Fixed by #1656
Labels
A-Tools Related to the process and tools for building the spec

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Feb 9, 2022

check-swagger-sources.py is a validation script that ensures the OpenAPI YAML is valid and that constraints are met.

Currently the script is failing with:

Traceback (most recent call last):
  File "/home/user/code/matrix-doc/./scripts/check-swagger-sources.py", line 185, in <module>
    check_swagger_file(path)
  File "/home/user/code/matrix-doc/./scripts/check-swagger-sources.py", line 107, in check_swagger_file
    check_response(filepath, request, code, response)
  File "/home/user/code/matrix-doc/./scripts/check-swagger-sources.py", line 85, in check_response
    raise ValueError("Error validating JSON schema for %r %r" % (
ValueError: ("Error validating JSON schema for 'GET /initialSync' 200", <ValidationError: "'event_id' is a required property">)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/code/matrix-doc/./scripts/check-swagger-sources.py", line 187, in <module>
    raise ValueError("Error checking file %s" % (path,), e)
ValueError: ('Error checking file /home/user/code/matrix-doc/data/api/client-server/old_sync.yaml', ValueError("Error validating JSON schema for 'GET /initialSync' 200", <ValidationError: "'event_id' is a required property">)

which will need to be fixed before it can land in CI. Edit: the breakage is tied to matrix-org/matrix-spec-proposals@36b02ed.

It can be run by simply installing the dependencies from scripts/requirements.txt and then running with python scripts/check-swagger-sources.py.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@turt2live turt2live added the A-Tools Related to the process and tools for building the spec label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tools Related to the process and tools for building the spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants