-
Notifications
You must be signed in to change notification settings - Fork 2
Feature | Extend Swagger Coverage for controller DistributionsApiController
#359
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
Merged
smarcet
merged 15 commits into
main
from
feature/add-openapi-documentation-to-controller-marketplace---distributionsapicontroller
Nov 27, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5292a62
feat: Add OpenAPI documentation to "getAll" method
matiasperrone-exo e0674bb
chore: Add controller's response OpenAPI schema
matiasperrone-exo 09f9db5
chore: Add Marketplace tag
matiasperrone-exo 9dd1ae7
chore: Move schema to its new file app/Swagger/MarketplaceSchemas.php
matiasperrone-exo 3ee4296
chore: Add/Move anyOf fields company, type and reviews for expand
matiasperrone-exo 7d26c01
chore: Revert unwanted change
matiasperrone-exo 919cdf8
chore: change the tag name to title case with spaces
matiasperrone-exo f9e406c
chore: Add sort fields and Marketplace tag
matiasperrone e634151
chore: add page and per_page missing params
matiasperrone 2a7092d
chore: Add all the referenced schemas
matiasperrone 84bfbca
chore: add missing refs
matiasperrone d1cf6aa
chore: restore "docker-compose/opentelemetry/otel-traces.json" file a…
matiasperrone 7c4f017
chore: Add generic OpenStackImplementation schema
matiasperrone 1c30cea
fix: add missing schemas
matiasperrone f531d99
fix: types on `app/Swagger/Models/CompanySchema.php`
matiasperrone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'Company', | ||
| type: 'object', | ||
| 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"), | ||
| ]) | ||
| ] | ||
| class CompanySchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'Distribution', | ||
| ref: '#/components/schemas/OpenStackImplementation', | ||
| )] | ||
| class DistributionSchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'GuestOSType', | ||
| type: 'object', | ||
| 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: 'type', type: 'string', example: 'KVM'), | ||
| ]) | ||
| ] | ||
| class GuestOSTypeSchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'HyperVisorType', | ||
| type: 'object', | ||
| 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: 'type', type: 'string', example: 'KVM'), | ||
| ]) | ||
| ] | ||
| class HyperVisorTypeSchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'OpenStackComponent', | ||
| type: 'object', | ||
| 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: 'code_name', type: 'string'), | ||
| ]) | ||
| ] | ||
| class OpenStackComponentSchema | ||
| { | ||
| } |
22 changes: 22 additions & 0 deletions
22
app/Swagger/Models/OpenStackImplementationApiCoverageSchema.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'OpenStackImplementationApiCoverage', | ||
| type: 'object', | ||
| 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: 'api_coverage', type: 'integer', example: 1), | ||
| new OA\Property(property: 'component', ref: '#/components/schemas/OpenStackComponent'), | ||
| new OA\Property(property: 'release', ref: '#/components/schemas/OpenStackRelease'), | ||
| ] | ||
| )] | ||
| class OpenStackImplementationApiCoverageSchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
| #[OA\Schema( | ||
| schema: 'OpenStackImplementation', | ||
| type: 'object', | ||
| 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: 'supported_regions', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/RegionalSupport'),]), description: "RegionalSupport, only available on expand"), | ||
| new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'is_openstack_powered', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'is_openstack_tested', type: 'boolean', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'openstack_tested_info', type: 'string', description: "RegionalSupport, only available on expand", ), | ||
| new OA\Property(property: 'capabilities', type: 'array', items: new OA\Items(ref: '#/components/schemas/OpenStackImplementationApiCoverage'), description: "OpenStackImplementationApiCoverage, only available on relations", ), | ||
| new OA\Property(property: 'guests', type: 'array', items: new OA\Items(ref: '#/components/schemas/GuestOSType'), description: "GuestOSType, only available on relations", ), | ||
| new OA\Property(property: 'hypervisors', type: 'array', items: new OA\Items(ref: '#/components/schemas/HyperVisorType'), description: "HyperVisorType, only available on relations", ), | ||
| ] | ||
| )] | ||
| class OpenStackImplementationSchema | ||
| { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <?php | ||
|
|
||
| namespace App\Swagger\schemas; | ||
|
|
||
| use OpenApi\Attributes as OA; | ||
|
|
||
|
|
||
| #[OA\Schema( | ||
| schema: 'OpenStackRelease', | ||
| type: 'object', | ||
| 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: 'components', type: 'array', items: new OA\Items( | ||
| oneOf: [ | ||
| new OA\Schema(type: 'integer'), | ||
| new OA\Schema(ref: '#/components/schemas/OpenStackComponent'), | ||
| ] | ||
| ), description: "OpenStackComponent supported by the distribution, IDs when used as relationship, object when included in expand"), | ||
| ]) | ||
| ] | ||
| class OpenStackReleaseSchema | ||
| { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.