Skip to content

Conversation

@matiasperrone-exo
Copy link
Contributor

@matiasperrone-exo matiasperrone-exo commented Sep 30, 2025

@matiasperrone-exo matiasperrone-exo self-assigned this Sep 30, 2025
@smarcet smarcet force-pushed the main branch 2 times, most recently from 2acb44b to 131872c Compare September 30, 2025 14:38
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch 2 times, most recently from 97cab41 to a2cc09d Compare September 30, 2025 15:56
@matiasperrone-exo matiasperrone-exo marked this pull request as ready for review September 30, 2025 15:57
@matiasperrone-exo matiasperrone-exo changed the title Feature | Extend Swagger Coverage for controller /Apis/Marketplace/PublicCloudsApiController.php Feature | Extend Swagger Coverage for controller Apis/Marketplace/PublicCloudsApiController.php Sep 30, 2025
@smarcet smarcet force-pushed the main branch 9 times, most recently from c94fc68 to 9a8387b Compare October 2, 2025 17:58
@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Oct 7, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch from a2cc09d to dc53dbc Compare October 7, 2025 21:14
@matiasperrone-exo matiasperrone-exo changed the title Feature | Extend Swagger Coverage for controller Apis/Marketplace/PublicCloudsApiController.php Feature | Extend Swagger Coverage for controller PublicCloudsApiController Oct 7, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch from 58da529 to d762563 Compare October 7, 2025 21:27
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch 2 times, most recently from 026c961 to a843136 Compare October 14, 2025 15:57
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.

This is generating a schema reference error and breaking doc generation.
The schema: parameter in OpenAPI attributes should NOT include the "Schema" suffix, but the class name should keep it.

In MarketplaceSchemas.php, change:

  • schema: 'PublicOrPrivateCloudsResponseSchema'schema: 'PublicOrPrivateCloudsResponse'
  • schema: 'PaginatedPublicOrPrivateCloudsResponseSchema'schema: 'PaginatedPublicOrPrivateCloudsResponse'

Keep class names as: class PublicOrPrivateCloudsResponseSchema (correct as-is)

See /app/Swagger/schemas.php for examples: schema: 'RSVPInvitation' with class RSVPInvitationSchema

Minor - PHPDoc typo
Line 24: "PrivateCloudsApiController" → "PublicCloudsApiController"

After these fixes, please run php artisan l5-swagger:generate to verify.

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch from a843136 to 2161e2e Compare October 31, 2025 13:26
@matiasperrone-exo
Copy link
Contributor Author

This is generating a schema reference error and breaking doc generation. The schema: parameter in OpenAPI attributes should NOT include the "Schema" suffix, but the class name should keep it.

In MarketplaceSchemas.php, change:

  • schema: 'PublicOrPrivateCloudsResponseSchema'schema: 'PublicOrPrivateCloudsResponse'
  • schema: 'PaginatedPublicOrPrivateCloudsResponseSchema'schema: 'PaginatedPublicOrPrivateCloudsResponse'

Keep class names as: class PublicOrPrivateCloudsResponseSchema (correct as-is)

See /app/Swagger/schemas.php for examples: schema: 'RSVPInvitation' with class RSVPInvitationSchema

Minor - PHPDoc typo Line 24: "PrivateCloudsApiController" → "PublicCloudsApiController"

After these fixes, please run php artisan l5-swagger:generate to verify.

Done, thanks!

@matiasperrone-exo matiasperrone-exo added review Need reviewing from the developer and removed review Need reviewing from the developer labels 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.

This is approved for merge @matiasperrone-exo @smarcet

@caseylocker
Copy link

caseylocker commented Nov 14, 2025

@matiasperrone-exo On second look this one and #363 both have a few issues that I didn't catch.

  • Expand on the 'order' parameter description.

description: 'Order by field(s). Available fields: id, name. Use "-" prefix for descending order.',

  • Missing pagination parameters (page, per_page). Add 'page' and 'per_page' parameters to the controller

Example:

new OA\Parameter(
    name: 'page',
    in: 'query',
    required: false,
    description: 'Page number for pagination',
    schema: new OA\Schema(type: 'integer', example: 1)
),
new OA\Parameter(
    name: 'per_page',
    in: 'query',
    required: false,
    description: 'Items per page',
    schema: new OA\Schema(type: 'integer', example: 10, maximum: 100)
),
  • Enhance filter operator descriptions (=@ means "starts with", etc.)

format field<op>value. Available fields: name, company. Operators: == (equals), =@ (starts with), @@ (contains).',

  • Clarify expand parameter behavior (what gets replaces on expansion)

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch from 348b4cf to 73b6562 Compare November 27, 2025 15:58
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller-marketplace---publiccloudsapicontroller branch from 73b6562 to 54a04db Compare November 27, 2025 16:02
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.

This looks good. @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 60d5b97 into main Dec 3, 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