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

Fix broken reference in OpenAPI spec, improve validation tests #4201

Merged
merged 10 commits into from
Jun 28, 2024

Conversation

dafeder
Copy link
Member

@dafeder dafeder commented Jun 25, 2024

There were some inconsistencies in the responses for the metastore section of the OpenAPI spec. Changing them broke the crude response validator I had implemented using OPIS schema validation. This fixes up the spec and switches to using osteel/openapi-httpfoundation-testing for response validation, which is I think a better approach.

QA Steps

  1. Stand up side, and grab the full spec from /api/1
  2. Paste the spec into https://editor.swagger.io/ and confirm it throws no errors
  3. Perform any additional validation you wish

Merging instructions

  1. Review and approve this PR. DO NOT MERGE YET
  2. Merge Add osteel/openapi-httpfoundation-testing to 10.1.x dev dependencies recommended-project#39
  3. Merge Add osteel/openapi-httpfoundation-testing to 10.2.x recommended-project#40
  4. Update .circleci/config.yml to use correct branches of GetDKAN/recommended-project again (feel free to reassign back to @dafeder for this part)
  5. Confirm tests still pass and merge this PR

Notes

Re: codeclimate, that function is completely declarative and wouldn't benefit from breaking up, so I think ok to override.

This PR removes Drupal 10.0 from the CI matrix, which was creating dependency issues for the openapi library. 10.0 is no longer supported so we feel comfortable dropping testing for it. This does not mean that production builds with DKAN will fail for 10.0, but core PHPUnit tests will.

@dafeder dafeder marked this pull request as draft June 25, 2024 19:42
@dafeder dafeder requested a review from paul-m June 26, 2024 19:42
@dafeder dafeder marked this pull request as ready for review June 26, 2024 19:42
Copy link
Contributor

@paul-m paul-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this change, NOT MERGING YET per instructions....

@paul-m paul-m merged commit d70d916 into 2.x Jun 28, 2024
10 checks passed
@dafeder dafeder deleted the openapi-ref-fix branch July 2, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants