Skip to content

Conversation

@nickvergessen
Copy link
Member

Fix #217

grafik

@nickvergessen nickvergessen self-assigned this Mar 4, 2025
@nickvergessen nickvergessen added the enhancement New feature or request label Mar 4, 2025
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear this implementation is not compatible with #214 and I would really like to get that PR merged first and avoid rebasing it.

@provokateurin
Copy link
Member

Please try a rebase, hopefully you don't need to change too much 🤞

@nickvergessen nickvergessen force-pushed the bugfix/217/allow-deprecating-parameters branch from 2f26338 to 0a5e7b6 Compare March 4, 2025 10:02
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated parameters for GET methods don't seem to work correctly.

Comment on lines 233 to 235
if (str_contains($param->type->description, '@deprecated')) {
$param->type->deprecated = true;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest replacing @deprecated with Deprecated: in the description to make it a bit more readable like a normal sentence.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then we loose IDE highlighting:
grafik

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only meant in the OpenAPI output, not in the phpdocs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, in the parsed openapi.json
We can try that

@nickvergessen nickvergessen force-pushed the bugfix/217/allow-deprecating-parameters branch from 0a5e7b6 to 4badf2a Compare March 4, 2025 10:39
@nickvergessen
Copy link
Member Author

POST GET
grafik grafik

@nickvergessen nickvergessen force-pushed the bugfix/217/allow-deprecating-parameters branch from 4badf2a to aad84fd Compare March 4, 2025 10:58
@nickvergessen nickvergessen merged commit 80e1020 into main Mar 5, 2025
16 of 19 checks passed
@nickvergessen nickvergessen deleted the bugfix/217/allow-deprecating-parameters branch March 5, 2025 13:04
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

Successfully merging this pull request may close these issues.

@deprecated in the description of a parameter marks the whole endpoint deprecated

3 participants