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

Support x-operation-name extension #30

Closed
exejutable opened this issue Jul 26, 2019 · 2 comments
Closed

Support x-operation-name extension #30

exejutable opened this issue Jul 26, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@exejutable
Copy link

Today if the operationId is repeated add a suffix to the name for example:

users:
    get:
        operationId: find
        tags:
            - users
organizations:
    get:
        operationId: find
        tags:
            - organizations

this create two services users with the method find and the service organizations with the method find_1. Maybe we can change this to make the combination of tag and operationId unique to prevent the suffix in this cases?

@luisfpg
Copy link
Contributor

luisfpg commented Jul 30, 2019

This won't be implemented, because the OpenAPI specification says:

operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.

Alternatively, we can add support for x-operation-name from Loopback. Would that be an option?

@exejutable
Copy link
Author

I see, okey we can go for the second one, add funtionality. I check the doc of openapi , we can extend the spec respecting the rules they propose.

@luisfpg luisfpg changed the title [Improve] Naming operationId filter by tags Support x-operation-name extension Jul 31, 2019
@luisfpg luisfpg self-assigned this Jul 31, 2019
@luisfpg luisfpg added the enhancement New feature or request label Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants