Skip to content

Commit 827fa1d

Browse files
committed
feat: change to ref the custom types
1 parent 5e30e60 commit 827fa1d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/Swagger/CompaniesSchemas.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
new OA\Property(property: "overview", type: "string", nullable: true, example: "Company overview"),
3535
new OA\Property(property: "commitment", type: "string", nullable: true, example: "Commitment to open source"),
3636
new OA\Property(property: "commitment_author", type: "string", nullable: true, example: "John Doe, CEO"),
37-
],
38-
anyOf: [
3937
new OA\Property(
4038
property: "sponsorships",
4139
type: "array",
@@ -46,7 +44,7 @@
4644
new OA\Property(
4745
property: "sponsorships",
4846
type: "array",
49-
items: new OA\Items(type: "SummitSponsorship"),
47+
items: new OA\Items(ref: "#/components/schemas/SummitSponsorship"),
5048
description: "Array of SummitSponsorship models (only when expand=sponsorships)",
5149
),
5250
new OA\Property(
@@ -59,7 +57,7 @@
5957
new OA\Property(
6058
property: "project_sponsorships",
6159
type: "array",
62-
items: new OA\Items(type: "ProjectSponsorshipType"),
60+
items: new OA\Items(ref: "#/components/schemas/ProjectSponsorshipType"),
6361
description: "Array of project ProjectSponsorshipType models (only when expand=project_sponsorships)",
6462
),
6563
],

0 commit comments

Comments
 (0)