Skip to content

Place the openapi deprecation tag directly under parameters #714

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

Merged
merged 4 commits into from
Apr 25, 2025

Conversation

mokshasoft
Copy link
Contributor

When creating an openapi handler via reitit.openapi/create-openapi-handler the parameter deprecation tags are put under the schema tag, not directly under the parameters tag.

https://swagger.io/docs/specification/v3_0/describing-parameters/#deprecated-parameters

The openapi.json generated without this fix:

          {
            "in": "query",
            "name": "include-legacy-information",
            "required": false,
            "schema": {
              "deprecated": true
            },
          },

The openapi.json generated with this fix:

          {
            "in": "query",
            "name": "include-legacy-information",
            "required": false,
            "schema": {},
            "deprecated": true
          },

I was able to run these tests, that passed:
./scripts/test.sh clj
but not these, that failed for an unrelated reason:
./scripts/test.sh cljs

@opqdonut opqdonut self-assigned this Apr 25, 2025
@opqdonut opqdonut self-requested a review April 25, 2025 07:56
@opqdonut
Copy link
Member

Thanks for the fix! I'm sorry I didn't notice this earlier. I'll try to get it in ASAP.

@opqdonut opqdonut force-pushed the openapi3-parameter-deprecation branch from 2e58e73 to 3c61399 Compare April 25, 2025 12:08
@opqdonut opqdonut merged commit 9797725 into metosin:master Apr 25, 2025
6 checks passed
@opqdonut
Copy link
Member

thanks once more! will be out in the next release!

@mokshasoft
Copy link
Contributor Author

You're welcome!

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.

2 participants