Skip to content

Commit

Permalink
Merge pull request #31 from sklevenz/dev
Browse files Browse the repository at this point in the history
fix enum/type issues caused by oapi-codegen generator
  • Loading branch information
sklevenz authored Feb 2, 2025
2 parents dda937c + 571551f commit e637238
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ content:
type: integer
description: The position of the buildpack in the order of execution
state:
type: string
description: The state of the buildpack
enum:
- AWAITING_UPLOAD
- READY
$ref: "../schemas/buildpackStateType.yaml"
enabled:
type: boolean
description: Whether the buildpack is enabled
Expand Down
6 changes: 1 addition & 5 deletions spec/components/requestBodies/packageCreateRequestBody.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ content:
type: object
properties:
type:
type: string
description: Type of the package; valid values are bits or docker
enum:
- bits
- docker
$ref: "../schemas/packageCreateRequestBodyType.yaml"
data:
type: object
description: Data for package type
Expand Down
5 changes: 5 additions & 0 deletions spec/components/schemas/buildpackStateType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: string
description: "Possible states of a buildpack"
enum:
- AWAITING_UPLOAD
- READY
5 changes: 5 additions & 0 deletions spec/components/schemas/packageCreateRequestBodyType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: string
description: "Valid package types"
enum:
- bits
- docker
32 changes: 3 additions & 29 deletions spec/components/schemas/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,7 @@ allOf:
type: object
properties:
type:
type: string
description: >-
Role type. Possible values are:
- `organization_user`: A user in the organization
- `organization_auditor`: An auditor in the organization
- `organization_manager`: A manager in the organization
- `organization_billing_manager`: A billing manager in the organization
- `space_auditor`: An auditor in the space
- `space_developer`: A developer in the space
- `space_manager`: A manager in the space
- `space_supporter`: A supporter in the space (not authorized to use the
V2 API)
enum:
- organization_user
- organization_auditor
- organization_manager
- organization_billing_manager
- space_auditor
- space_developer
- space_manager
- space_supporter
$ref: "./roleCreateType.yaml"
relationships:
allOf:
- $ref: ./relationships.yaml
Expand Down Expand Up @@ -61,3 +33,5 @@ description: >
to the role.
See Roles for specific roles.
29 changes: 29 additions & 0 deletions spec/components/schemas/roleCreateType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
type: string
description: >-
Role type. Possible values are:
- `organization_user`: A user in the organization
- `organization_auditor`: An auditor in the organization
- `organization_manager`: A manager in the organization
- `organization_billing_manager`: A billing manager in the organization
- `space_auditor`: An auditor in the space
- `space_developer`: A developer in the space
- `space_manager`: A manager in the space
- `space_supporter`: A supporter in the space (not authorized to use the
V2 API)
enum:
- organization_user
- organization_auditor
- organization_manager
- organization_billing_manager
- space_auditor
- space_developer
- space_manager
- space_supporter
8 changes: 1 addition & 7 deletions spec/components/schemas/routeDestination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ properties:
type: integer
description: Port of the destination that receives traffic.
protocol:
type: string
description: >-
Protocol of the destination that receives traffic. Defaults to 'http1'
when not specified for HTTP routes, and is ignored for TCP routes.
enum:
- http1
- http2
$ref: "./routeDestinationsProtocol.yaml"
created_at:
type: string
format: date-time
Expand Down
5 changes: 5 additions & 0 deletions spec/components/schemas/routeDestinationsProtocol.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: string
description: "Valid protocols for route destinations"
enum:
- http1
- http2

0 comments on commit e637238

Please sign in to comment.