-
Notifications
You must be signed in to change notification settings - Fork 2
Feature | Extend Swagger Coverage for controller OAuth2SummitRegistrationInvitationApiController
#411
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
base: main
Are you sure you want to change the base?
Conversation
26e0a49 to
460b0d9
Compare
5cd98f1 to
21e91d7
Compare
caseylocker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong Namespace in Security Schema
File: app/Swagger/Security/SummitRegistrationInvitationAuthSchema.php
namespace App\Swagger\Security; // WRONG
Should be:
namespace App\Swagger\schemas; // CORRECT
Protected endpoints use 'authz_groups' instead of the standard 'required-groups':
x: [
'authz_groups' => [ // Wrong key name
IGroup::SuperAdmins,
...
]
],
Should be:
x: [
'required-groups' => [ // Correct key name
IGroup::SuperAdmins,
...
]
],
21e91d7 to
4ef615f
Compare
|
Thanks @caseylocker for the comments. Now is ready to review again |
caseylocker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matiasperrone this is looking good and is very close.
Since this is using OpenAPI 3.0 the "tags" property in SummitRegistrationSchemas.php is invalid.
// Invalid - only valid for OpenAPI 3.1
new OA\Property(property: "tags", type: "array", items: new OA\Items(type: ["integer", "string"]), ...)
Either simplify for integers only:
new OA\Property(
property: "tags",
type: "array",
items: new OA\Items(type: "integer"),
description: "Array of Tag IDs. Full Tag objects when ?expand=tags",
nullable: true
)
Or use oneOf
new OA\Property(
property: "tags",
type: "array",
items: new OA\Items(
oneOf: [
new OA\Schema(type: "integer"),
new OA\Schema(type: "string")
]
),
description: "Array of Tag IDs or names when expanded",
nullable: true
)
0f67d32 to
8957230
Compare
|
Moved to OpenAPI 3.1. please approve PR. |
caseylocker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be consistent with http response codes. I haven't been calling all of these out but I'm going to be doing that again.
ALL responses should use the response constants rather than the raw numbers.
"response: 200" should be "Response::HTTP_OK"
"response: 204" should be "Response::HTTP_NO_CONTENT"
"response: 201" should be "Response::HTTP_CREATED"
There are about 13 occurrences here that need to be updated.
…nInvitationApiController`
…schema, fix path routes and change schema to be defined as requested
0567160 to
16057ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved too soon. @matiasperrone-exo This is failing on documentation generation.
smarcet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
c6ecdd0 to
728ae67
Compare
smarcet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Task:
Ref: https://app.clickup.com/t/86b6wkh87