Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 1 addition & 54 deletions app/Swagger/CompaniesSchemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,6 @@

// Companies Schemas

#[OA\Schema(
schema: "Company",
description: "Company",
properties: [
new OA\Property(property: "id", type: "integer", example: 1),
new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890),
new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890),
new OA\Property(property: "name", type: "string", example: "Acme Corporation"),
new OA\Property(property: "url", type: "string", format: "uri", nullable: true, example: "https://www.acme.com"),
new OA\Property(property: "url_segment", type: "string", nullable: true, example: "acme-corporation"),
new OA\Property(property: "display_on_site", type: "boolean", example: true),
new OA\Property(property: "featured", type: "boolean", example: false),
new OA\Property(property: "city", type: "string", nullable: true, example: "San Francisco"),
new OA\Property(property: "state", type: "string", nullable: true, example: "California"),
new OA\Property(property: "country", type: "string", nullable: true, example: "United States"),
new OA\Property(property: "description", type: "string", nullable: true, example: "Leading technology company"),
new OA\Property(property: "industry", type: "string", nullable: true, example: "Technology"),
new OA\Property(property: "products", type: "string", nullable: true, example: "Cloud services, Software"),
new OA\Property(property: "contributions", type: "string", nullable: true, example: "OpenStack contributions"),
new OA\Property(property: "contact_email", type: "string", format: "email", nullable: true, example: "contact@acme.com"),
new OA\Property(property: "member_level", type: "string", nullable: true, example: "Platinum"),
new OA\Property(property: "admin_email", type: "string", format: "email", nullable: true, example: "admin@acme.com"),
new OA\Property(property: "color", type: "string", nullable: true, example: "#FF5733"),
new OA\Property(property: "logo", type: "string", format: "uri", nullable: true, example: "https://cdn.example.com/logo.png"),
new OA\Property(property: "big_logo", type: "string", format: "uri", nullable: true, example: "https://cdn.example.com/big_logo.png"),
new OA\Property(property: "overview", type: "string", nullable: true, example: "Company overview"),
new OA\Property(property: "commitment", type: "string", nullable: true, example: "Commitment to open source"),
new OA\Property(property: "commitment_author", type: "string", nullable: true, example: "John Doe, CEO"),
new OA\Property(
property: "sponsorships",
type: "array",
items: new OA\Items(oneOf: [
new OA\Schema(type: "integer"),
new OA\Schema(ref: "#/components/schemas/SummitSponsorship"),
]),
description: "Array of sponsorship IDs (only when relations=sponsorships)",
),
new OA\Property(
property: "project_sponsorships",
type: "array",
items: new OA\Items(oneOf: [
new OA\Schema(type: "integer"),
new OA\Schema(ref: "#/components/schemas/ProjectSponsorshipType"),
]),
description: "Array of project sponsorship IDs (only when relations=project_sponsorships)",
),
],
type: "object"
)]
class CompanySchema
{
}

#[OA\Schema(
schema: "PaginatedCompaniesResponse",
description: "Paginated response for Companies",
Expand Down Expand Up @@ -136,4 +83,4 @@ class CompanyCreateRequestSchema
)]
class CompanyUpdateRequestSchema
{
}
}
78 changes: 48 additions & 30 deletions app/Swagger/Models/CompanySchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,56 @@
use OpenApi\Attributes as OA;



#[OA\Schema(
schema: 'Company',
type: 'object',
schema: "Company",
description: "Company",
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1),
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
new OA\Property(property: 'name', type: 'string'),
new OA\Property(property: 'url', type: 'string'),
new OA\Property(property: 'url_segment', type: 'string'),
new OA\Property(property: 'city', type: 'string'),
new OA\Property(property: 'state', type: 'string'),
new OA\Property(property: 'country', type: 'string'),
new OA\Property(property: 'description', type: 'string'),
new OA\Property(property: 'industry', type: 'string'),
new OA\Property(property: 'contributions', type: 'string'),
new OA\Property(property: 'member_level', type: 'string'),
new OA\Property(property: 'overview', type: 'string'),
new OA\Property(property: 'products', type: 'string'),
new OA\Property(property: 'commitment', type: 'string'),
new OA\Property(property: 'commitment_author', type: 'string'),
new OA\Property(property: 'logo', type: 'string'),
new OA\Property(property: 'big_logo', type: 'string'),
new OA\Property(property: 'color', type: 'string'),
new OA\Property(property: 'display_on_site', type: 'boolean'),
new OA\Property(property: 'featured', type: 'boolean'),
new OA\Property(property: 'contact_email', type: 'string'),
new OA\Property(property: 'admin_email', type: 'string'),
new OA\Property(property: 'sponsorships', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/SummitSponsorship'),]), description: "SummitSponsorship, IDs when used as relationship, object when included in expand"),
new OA\Property(property: 'project_sponsorships', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/ProjectSponsorshipType'),]), description: "ProjectSponsorshipType supported by the distribution, IDs when used as relationship, object when included in expand"),
])
]
new OA\Property(property: "id", type: "integer", example: 1),
new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890),
new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890),
new OA\Property(property: "name", type: "string", example: "Acme Corporation"),
new OA\Property(property: "url", type: "string", format: "uri", example: "https://www.acme.com"),
new OA\Property(property: "url_segment", type: "string", example: "acme-corporation"),
new OA\Property(property: "city", type: "string", example: "San Francisco"),
new OA\Property(property: "state", type: "string", example: "California"),
new OA\Property(property: "country", type: "string", example: "United States"),
new OA\Property(property: "description", type: "string", example: "Leading technology company"),
new OA\Property(property: "industry", type: "string", example: "Technology"),
new OA\Property(property: "contributions", type: "string", example: "OpenStack contributions"),
new OA\Property(property: "member_level", type: "string", example: "Platinum"),
new OA\Property(property: "overview", type: "string", example: "Company overview"),
new OA\Property(property: "products", type: "string", example: "Cloud services, Software"),
new OA\Property(property: "commitment", type: "string", example: "Commitment to open source"),
new OA\Property(property: "commitment_author", type: "string", example: "John Doe, CEO"),
new OA\Property(property: "logo", type: "string", format: "uri", example: "https://cdn.example.com/logo.png"),
new OA\Property(property: "big_logo", type: "string", format: "uri", example: "https://cdn.example.com/big_logo.png"),
new OA\Property(property: "color", type: "string", example: "#FF5733"),
new OA\Property(property: "display_on_site", type: "boolean", example: true),
new OA\Property(property: "featured", type: "boolean", example: false),
new OA\Property(property: "contact_email", type: "string", format: "email", example: "contact@acme.com"),
new OA\Property(property: "admin_email", type: "string", format: "email", example: "admin@acme.com"),
new OA\Property(
property: "sponsorships",
type: "array",
items: new OA\Items(oneOf: [
new OA\Schema(type: "integer"),
new OA\Schema(ref: "#/components/schemas/SummitSponsorship"),
]),
description: "Array of sponsorship IDs (only when relations=sponsorships)",
),
new OA\Property(
property: "project_sponsorships",
type: "array",
items: new OA\Items(oneOf: [
new OA\Schema(type: "integer"),
new OA\Schema(ref: "#/components/schemas/ProjectSponsorshipType"),
]),
description: "Array of project sponsorship IDs (only when relations=project_sponsorships)",
),
],
type: "object"
)]
class CompanySchema
{
}