Open
Description
Example openapi spec for reproducing the issue -
openapi: 3.0.3
info:Test API Reference
version: '1.0'
description: This is the Open Api Spec 3 for the TEST Service. This is under active development. Beware of the breaking change with respect to the generated code stub.
contact:
name: API Support
email: [email protected]
url: 'https://test.io/'
servers:
- url: 'https://app.test.io'
paths:
'/v1/integrations/{integration}':
post:
summary: Create integration
tags:
- Integrations
operationId: create-integration
responses:
'201':
$ref: '#/components/responses/IntegrationResponse'
x-stoplight:
id: 7ky8v205wqtp4
description: Create integration
security:
- x-api-key: []
parameters:
- $ref: '#/components/parameters/Integration'
- $ref: '#/components/parameters/AccountHeader'
- $ref: '#/components/parameters/DryRun'
- $ref: '#/components/parameters/WriteValidation'
requestBody:
$ref: '#/components/requestBodies/IntegrationRequest'
x-internal: false
components:
schemas:
AbstractIntegrationRequest:
title: AbstractIntegrationRequest
type: object
description: Abstract for integration request
properties:
request:
$ref: '#/components/schemas/BaseIntegrationRequest'
required:
- request
BaseIntegrationRequest:
title: BaseIntegrationRequest
type: object
description: Base integration request
required:
- type
discriminator:
propertyName: type
mapping:
git: '#/components/schemas/GitIntegrationRequest'
properties:
type:
type: string
enum:
- git
GitIntegrationRequest:
title: GitIntegrationRequest
x-discriminator-value: git
description: Git Integration Request
allOf:
- $ref: '#/components/schemas/BaseIntegrationRequest'
- type: object
properties:
type:
type: string
enum:
- git
connector_identifier:
type: string
read_validation_details:
$ref: '#/components/schemas/ReadValidationDetails'
write_validation_details:
$ref: '#/components/schemas/WriteValidationDetails'
required:
- type
- connector_identifier
ReadValidationDetails:
title: ReadValidationDetails
type: object
properties:
file_url:
type: string
WriteValidationDetails:
title: WriteValidationDetails
type: object
properties:
repository:
type: string
branch:
type: string
path:
type: string
ValidationResponse:
title: ValidationResponse
type: object
properties:
url:
type: string
status:
type: string
error:
type: string
validated:
type: integer
format: int64
AbstractIntegrationResponse:
title: AbstractIntegrationResponse
type: object
properties:
response:
$ref: "#/components/schemas/BaseIntegrationResponse"
BaseIntegrationResponse:
title: BaseIntegrationResponse
type: object
description: Base integration response
discriminator:
propertyName: type
mapping:
git: '#/components/schemas/GitIntegrationResponse'
properties:
type:
type: string
enum:
- git
GitIntegrationResponse:
x-discriminator-value: git
allOf:
- $ref: "#/components/schemas/BaseIntegrationResponse"
- type: object
properties:
identifier:
type: string
name:
type: string
connector_identifier:
type: string
connector_type:
type: string
display_type:
type: string
host:
type: string
auth_type:
type: string
via_delegate:
type: boolean
validation:
$ref: '#/components/schemas/ValidationResponse'
parameters:
AccountHeader:
name: Harness-Account
in: header
required: false
schema:
type: string
description: 'Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.'
Integration:
name: integration
in: path
description: Integration
required: true
schema:
type: string
enum:
- git
DryRun:
name: dry_run
in: query
required: false
schema:
type: boolean
description: This is used if we need to dry run for integration
WriteValidation:
name: write_validation
in: query
required: false
schema:
type: boolean
description: This is used if we need to dry run write permission for integration
requestBodies:
IntegrationRequest:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AbstractIntegrationRequest'
examples: { }
description: Details of Integration Request
responses:
IntegrationResponse:
description: Response for integration
content:
application/json:
schema:
$ref: '#/components/schemas/AbstractIntegrationResponse'
application/yaml:
schema:
$ref: '#/components/schemas/AbstractIntegrationResponse'
securitySchemes:
x-api-key:
name: x-api-key
type: apiKey
in: header
tags:
- name: Integrations
description: Test Integrations
x-displayName: Test Integrations
When we try to generate the client code, we have GitIntegrationResponse, ValidationResponse, GitIntegrationRequest, ReadValidationDetails, WriteValidationDetails schemas missing.
Metadata
Metadata
Assignees
Labels
No labels