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

Incorrect deprecation warnings: "Since api-platform/core 3.1: The "openapiContext" option is deprecated, use "openapi" instead." #1898

Open
danielsippel opened this issue Feb 14, 2024 · 4 comments

Comments

@danielsippel
Copy link

danielsippel commented Feb 14, 2024

Version:
"api-platform/core": "v3.2.13"

As documentated here: https://api-platform.com/docs/core/openapi/#using-the-openapi-and-swagger-contexts
we set a lot of custom attributes to openapi/swagger, e.g.

    #[ORM\Column(type: 'string', length: 255)]
    #[ApiProperty(openapiContext: [
        'example' => 'your text here',
    ])]
    private ?string $status;

This produces a lot of warnings in the log (when calling the /api/docs page):
User Deprecated: Since api-platform/core 3.1: The "openapiContext" option is deprecated, use "openapi" instead.

Tried to just replace the key 'openapiContext' through 'openapi' -> does not work, fatal..

@danielsippel
Copy link
Author

Bildschirmfoto 2024-02-14 um 17 57 11

@vinceAmstoutz
Copy link
Contributor

@danielsippel I'll check this version number to see which parts of the documentation are obsolete with the deprecated openapiContext. I'll suggest changes if needed. Have you tried replacing occurrences of openapiContext with openapi, as the deprecation suggests?

@danielsippel
Copy link
Author

Yes, in version: "api-platform/core": "v3.2.13"
I replaced 'openapiContext' with 'openapi' -> Did not work, fatal..

@vinceAmstoutz
Copy link
Contributor

Can we have a reproducer please? @danielsippel

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

2 participants