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

How to change OpenApi version? #2158

Closed
DjordyKoert opened this issue Nov 23, 2023 · 2 comments
Closed

How to change OpenApi version? #2158

DjordyKoert opened this issue Nov 23, 2023 · 2 comments

Comments

@DjordyKoert
Copy link
Collaborator

DjordyKoert commented Nov 23, 2023

I have found another issue where someone also struggled with this problem #1950.

I tried to add the OpenApi attribute to a controller but this resulted in an error.

In OpenApiPhpDescriber.php line 138:
                                                                               
  Using the annotation "OpenApi\Attributes\OpenApi" as a root annotation in "App\Controllers\CustomerController::getCustomers()" is not allowed.  

Where/what is the correct way to do this?

@DjordyKoert
Copy link
Collaborator Author

DjordyKoert commented Nov 23, 2023

As shown in #1950 would it not make sense to get the version from the config and pass that to the generator of https://github.com/zircote/swagger-php if available? Otherwise just keep using the default (as it did before).

nelmio_api_doc:
    documentation:
        openapi: 3.1.0
        # the rest of the config

@DjordyKoert
Copy link
Collaborator Author

This could also be fixed by #2149

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

No branches or pull requests

1 participant