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): typing issue with openapiContext in #[ApiProperty] #6910

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

SebLevDev
Copy link
Contributor

When specify an openapiContext in #[ApiProperty], the typing of the same property is no longer used, and force to explicitly specify it within the openapiContext array.

Q A
Branch 3.4
Tickets Closes #6893
License MIT

…Leading to `any` in Documentation

When specify an `openapiContext` in #`[ApiProperty]`, the typing of the same property is no longer used, and force to explicitly specify it within the openapiContext array.

Cfr: api-platform#6893
@SebLevDev SebLevDev changed the title fix(openapi): Typing Issue with openapiContext in #[ApiProperty] Leading to any in Documentation fix(openapi): Typing Issue with openapiContext in #[ApiProperty] Jan 10, 2025
@SebLevDev SebLevDev changed the title fix(openapi): Typing Issue with openapiContext in #[ApiProperty] fix(openapi): typing issue with openapiContext in #[ApiProperty] Jan 10, 2025
@soyuka
Copy link
Member

soyuka commented Jan 13, 2025

would you be able to add a non-regression test? I like the patch!

@SebLevDev
Copy link
Contributor Author

would you be able to add a non-regression test? I like the patch!

Do you have a exemple of test for SchemaPropertyMetadataFactory.php
I see nothing
https://github.com/api-platform/core/tree/main/tests/JsonSchema

@SebLevDev
Copy link
Contributor Author

This morning i found this

public function testWithCustomOpenApiContext(): void

I try t do that

@soyuka soyuka merged commit ab03b55 into api-platform:3.4 Jan 16, 2025
77 of 78 checks passed
@soyuka
Copy link
Member

soyuka commented Jan 16, 2025

awesome thanks @SebLevDev !

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