Skip to content

Conversation

Mohammad-Alavi
Copy link

@Mohammad-Alavi Mohammad-Alavi commented Sep 20, 2023

Description

Add summary, description & deprecated optional elements to Operation attribute.

This also fixes a problem ( #88) where you would get an error if you wouldn't provide summary or description and you had to at least provide an empty DocBlock to get around it. Now you can just omit the DocBlock all together.

This PR is completely backward compatible.

Docs are updated accordingly.

Summary

For the moment, we can only add summary, description & deprecated elements through DocBlock:

/**
 * Get all users
 *
 * Get all users from the database.
 * 
 * @deprecated This endpoint is deprecated.
 */

This PR makes it possible to do it through Operation attribute too:

#[Operation(summary: 'Get all users', description: 'Get all users from the database.', deprecated: true)]

resolve #93

They are added to Operation attribute.
@Mohammad-Alavi Mohammad-Alavi changed the title feat: add operation optional elements Add operation optional elements Sep 20, 2023
@Mohammad-Alavi Mohammad-Alavi marked this pull request as ready for review September 21, 2023 10:47
@Mohammad-Alavi Mohammad-Alavi closed this by deleting the head repository Aug 30, 2024
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.

[Request] Add attribute Summary
1 participant