Skip to content

Conversation

@matiasperrone-exo
Copy link
Contributor

@matiasperrone-exo matiasperrone-exo self-assigned this Oct 9, 2025
@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Oct 13, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2userstoriesapicontroller branch from c5dffc3 to 19fb15c Compare October 14, 2025 17:28
Copy link

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

@matiasperrone-exo Comparing this to the others, like the RSVP, I believe the expanded fields should be included as refs to the schemas (or a generic object type).
new OA\Property(property: 'event', ref: '#/components/schemas/organization'),
Please, also, take a look at LegalDocument in this PR as it looks to be a duplicate from PR 388 and might cause issues on merge.

@matiasperrone-exo matiasperrone-exo added the review Need reviewing from the developer label Nov 10, 2025
Copy link

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

@matiasperrone-exo

This includes invalid types for the following properties. If you look at the rendered swagger you'll see what I mean.

new OA\Property(property: 'organization', type: 'Organization'),
new OA\Property(property: 'industry', type: 'Industry'),
new OA\Property(property: 'location', type: 'Location'),
new OA\Property(property: 'image', type: 'Image'),

For schema references, you must use ref. Required Fix:
new OA\Property(
property: 'organization',
ref: '#/components/schemas/Organization',
nullable: true
),
new OA\Property(
property: 'industry',
ref: '#/components/schemas/Industry',
nullable: true
),
new OA\Property(
property: 'location',
ref: '#/components/schemas/Location',
nullable: true
),
new OA\Property(
property: 'image',
ref: '#/components/schemas/Image',
nullable: true
),

Also please look at the LegalDocument schema that's been included in this one to determine if it's a duplicate of another one that was included accidentally. Either way this PR should just include items related to OAuth2UserStoriesApiController.

"expand" description should be "description: 'Expand relationships. Available: organization, industry, location, image, tags (converts tag IDs to full tag objects)',"
And update the tags schema property to reflect both states:
new OA\Property(
property: 'tags',
type: 'array',
description: 'Array of tag IDs (use expand=tags to get full tag objects)',
items: new OA\Items(type: 'integer'),
example: [1, 2, 3]
),

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2userstoriesapicontroller branch 2 times, most recently from 61aa7e3 to 09909c6 Compare November 14, 2025 21:32
@matiasperrone-exo
Copy link
Contributor Author

TBD ref or type to refer to undefined models schemas.
LegalDocument issue was fixed by rebasing with main.

WIP

@matiasperrone-exo matiasperrone-exo removed the review Need reviewing from the developer label Nov 18, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2userstoriesapicontroller branch from 09909c6 to dfb1196 Compare November 27, 2025 19:45
@matiasperrone
Copy link
Contributor

@caseylocker please review again as all the requested/agreed changes were incorporated.

Copy link

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

@matiasperrone This needs an operationId parameter.

#[OA\Get(
path: '/api/public/v1/user-stories',
operationId: 'getAllUserStories', // ← Add this
summary: 'Get all user stories',
// ...
)]

That should be it. Once that's added it should be good.

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2userstoriesapicontroller branch from 494675b to 8e66b27 Compare December 3, 2025 20:00
@matiasperrone-exo
Copy link
Contributor Author

Thanks @caseylocker for the comments. Now is ready to review again

Copy link

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

LGTM. @smarcet if you agree please merge.

Copy link
Collaborator

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

LGTM

@smarcet smarcet merged commit 900345a into main Dec 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants