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: OpenAPI warnings #749

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Fix: OpenAPI warnings #749

merged 3 commits into from
Aug 24, 2023

Conversation

newstler
Copy link
Contributor

@newstler newstler commented Apr 29, 2023

Closes #734
Required by bullet-train-co/bullet_train-core#270

  • Introduces .redocly.yaml config to turn off no-ambiguous-paths check, as Redocly team contributor confirmed that some paths in our API are considered non ambiguous (/projects/{project_id}/goals and /projects/tags/{id} for example).
  • Rewrote test/controllers/api/open_api_controller_test.rb so it fails on any warnings.

@newstler newstler marked this pull request as draft April 29, 2023 16:28
@newstler newstler marked this pull request as ready for review May 5, 2023 17:23
@newstler newstler force-pushed the fixes/openapi-warnings branch 2 times, most recently from ab42683 to fc9d501 Compare May 6, 2023 14:38
@newstler newstler marked this pull request as draft May 6, 2023 15:06
@newstler newstler marked this pull request as ready for review May 12, 2023 20:34
@newstler newstler mentioned this pull request Aug 21, 2023
@jagthedrummer
Copy link
Contributor

There are some test failures in the joint PR, which also show up here in the Core: tests. Going to convert this to a draft for now.

@jagthedrummer jagthedrummer marked this pull request as draft August 22, 2023 20:13
@jagthedrummer jagthedrummer marked this pull request as ready for review August 24, 2023 15:37
Gemfile.lock Outdated
@@ -605,7 +601,6 @@ GEM
PLATFORMS
arm64-darwin-21
arm64-darwin-22
ruby
Copy link
Contributor

@jagthedrummer jagthedrummer Aug 24, 2023

Choose a reason for hiding this comment

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

@newstler, I'm curious about all the removals in Gemfile.lock. Was that intentional?

Copy link
Contributor Author

@newstler newstler Aug 24, 2023

Choose a reason for hiding this comment

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

@jagthedrummer Most probably not, the only thing that should have changed there is update of jbuilder-schema to 2.2.0. I just restored Gemfile.lock from main, updated jbuilder-schema again and rebased everything against main. Doesn't fail on my local machine

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Excellent! The Release: failures here are just saying that these changes would break against the versions of the core gems that are currently pinned in Gemfile.lock. I'll merge the related PR in core, then release a new version of the gems, and bump Gemfile.lock and then this should be all good. Thanks for your work on it!

@jagthedrummer jagthedrummer merged commit e92bb69 into main Aug 24, 2023
@jagthedrummer jagthedrummer deleted the fixes/openapi-warnings branch August 24, 2023 16:37
jagthedrummer added a commit that referenced this pull request Aug 24, 2023
In #749 we
tried to bump the version of `jbuilder-schema`, but since it's a
dependency of `bullet_train-api` we need to leave it alone and let
it get upgraded naturally when we bump that gem.
jagthedrummer added a commit that referenced this pull request Aug 24, 2023
In #749 we
tried to bump the version of `jbuilder-schema`, but since it's a
dependency of `bullet_train-api` we need to leave it alone and let
it get upgraded naturally when we bump that gem.
@jagthedrummer jagthedrummer mentioned this pull request Aug 24, 2023
jagthedrummer added a commit that referenced this pull request Aug 24, 2023
In #749 we introduced more stringent checks in validating the Open API doc. https://github.com/bullet-train-co/bullet_train/pull/749/files#diff-c04c1d7b8b2c28801ca5fc5cfa976e08c1f9731284f8ad655655b2a12d9bcef6

After merging that, I also merged bullet-train-co/bullet_train-core#257 and #737 which were both passing prior to merging.

I think that they probably would have failed that new test if their branches had been up to date. Since failing the tests if the doc is invalid is a brand new introduction, I'm going to disable those assertions in that test.
jagthedrummer added a commit that referenced this pull request Aug 24, 2023
In #749 we introduced more stringent checks in validating the Open API doc. https://github.com/bullet-train-co/bullet_train/pull/749/files#diff-c04c1d7b8b2c28801ca5fc5cfa976e08c1f9731284f8ad655655b2a12d9bcef6

After merging that, I also merged bullet-train-co/bullet_train-core#257 and #737 which were both passing prior to merging.

I think that they probably would have failed that new test if their branches had been up to date. Since failing the tests if the doc is invalid is a brand new introduction, I'm going to disable those assertions in that test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix OpenAPI warnings for system test
2 participants