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 operation name plural appropriately #8017

Merged
merged 2 commits into from Nov 24, 2022

Conversation

heavenshell
Copy link
Contributor

Description

This PR is re-challenge of #7447

I introduced inflection library to pluralize appropriately.

It would be very grateful to review this 😊

Thank you.

@tomchristie
Copy link
Member

Certainly going to be neater than what we're currently doing.
I guess I don't have a problem with introducing this dependancy, given that it's pretty tiny.
Anyone else?

@heavenshell
Copy link
Contributor Author

Thank you for reviewing!

I don't know why CI is failing...
Could anyone help this?
What should I do?

@stale
Copy link

stale bot commented Apr 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 28, 2022
@heavenshell heavenshell force-pushed the topic/openapi-operation-plural branch from 480f486 to 7cf5c19 Compare April 28, 2022 14:54
@stale stale bot removed the stale label Apr 28, 2022
@stale
Copy link

stale bot commented Jul 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 13, 2022
@stale stale bot removed the stale label Jul 18, 2022
@stale
Copy link

stale bot commented Sep 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 21, 2022
@stale stale bot closed this Nov 23, 2022
@auvipy auvipy reopened this Nov 24, 2022
@auvipy
Copy link
Member

auvipy commented Nov 24, 2022

the only build failure is a doc related failure, which does not seem to be related to this PR

@auvipy auvipy merged commit 9e328a9 into encode:master Nov 24, 2022
@heavenshell heavenshell deleted the topic/openapi-operation-plural branch November 24, 2022 16:58
@heavenshell
Copy link
Contributor Author

@auvipy Thank you so much! 👍

tfranzel added a commit to tfranzel/django-rest-framework that referenced this pull request Nov 28, 2022
@tfranzel
Copy link
Member

pretty sure this broke the build by introducing a new hard dependency through the backdoor. see #8781

auvipy pushed a commit that referenced this pull request Nov 28, 2022
cweider added a commit to cweider/courtlistener that referenced this pull request Aug 23, 2023
A dependency on encode/django-rest-framework#8017 and later
made less obtrusive by encode/django-rest-framework#8781, but
it did not eliminate it. Any usage of the schema generator
must be done in an environment that includes this package.
cweider added a commit to cweider/courtlistener that referenced this pull request Aug 23, 2023
A dependency on encode/django-rest-framework#8017 and later
made less obtrusive by encode/django-rest-framework#8781, but
it did not eliminate it. Any usage of the schema generator
must be done in an environment that includes this package.
cweider added a commit to cweider/courtlistener that referenced this pull request Aug 23, 2023
`django-rest-framework` has recieved several patches for
CSP compatibility, but unfortunately these are not included
in the latest release (3.14.0) and a new release cannot be
expected for a while.

As such, we must replace the semantically versioned PyPI
reference with a reference to the latest commit on the master
branch of the package's Git Repository that contains the
changes that we need (do not use `master` since it could
change in unexpected and incompatible ways).

Included in this change is the `inflection` package,
unfortunate dependency added by encode/django-rest-framework#8017
and later made less obtrusive by encode/django-rest-framework#8781,
but it did not eliminate it. Any usage of the schema generator
must be done in an environment that includes this package.

Fixes: freelawproject#3020
cweider added a commit to cweider/courtlistener that referenced this pull request Aug 23, 2023
`django-rest-framework` has recieved several patches for
CSP compatibility, but unfortunately these are not included
in the latest release (3.14.0) and a new release cannot be
expected for a while.

As such, we must replace the semantically versioned PyPI
reference with a reference to the latest commit on the master
branch of the package's Git Repository that contains the
changes that we need (do not use `master` since it could
change in unexpected and incompatible ways).

Included in this change is the use of `inflection` for the
OpenAPI spec's `operationIds`, an unfortunate dependency
added by encode/django-rest-framework#8017 and later made
less obtrusive by encode/django-rest-framework#8781. Any
usage of the schema generator must be done in an environment
that includes this package. Additionally, this new approach
makes the generated `operationId` that was `listPersons` into
`listPeople`. Thankfully, this is immaterial.

Fixes: freelawproject#3020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants