docs: Correct OpenAPI schema for /source-control/pull (#31155)

This commit is contained in:
Marc Littlemore 2026-05-27 17:39:30 +01:00 committed by GitHub
parent b415544683
commit e9649d21fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 95 additions and 63 deletions

View File

@ -14,12 +14,17 @@ post:
$ref: '../schemas/pull.yml'
responses:
'200':
description: Import result
description: Pull result containing the list of files that were pulled from the remote repository.
content:
application/json:
schema:
$ref: '../schemas/importResult.yml'
$ref: '../schemas/pullResult.yml'
'400':
$ref: '../../../../shared/spec/responses/badRequest.yml'
'409':
$ref: '../../../../shared/spec/responses/conflict.yml'
description: |
Conflict due to uncommitted local changes or merge conflicts. The response body lists every file in the pull diff; files causing the conflict have `conflict: true` or `status: modified`. Retry with `force=true` to discard local changes.
content:
application/json:
schema:
$ref: '../schemas/pullResult.yml'

View File

@ -1,55 +0,0 @@
type: object
additionalProperties: true
properties:
variables:
type: object
properties:
added:
type: array
items:
type: string
changed:
type: array
items:
type: string
credentials:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
workflows:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
tags:
type: object
properties:
tags:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
mappings:
type: array
items:
type: object
properties:
workflowId:
type: string
tagId:
type: string

View File

@ -13,6 +13,3 @@ properties:
- `all`: Publish all imported workflows
- `published`: Publish only workflows that were published locally before import
example: published
variables:
type: object
example: { 'foo': 'bar' }

View File

@ -0,0 +1,3 @@
type: array
items:
$ref: './sourceControlledFile.yml'

View File

@ -0,0 +1,80 @@
type: object
required:
- file
- id
- name
- type
- status
- location
- conflict
- updatedAt
properties:
file:
type: string
id:
type: string
name:
type: string
type:
type: string
enum:
- credential
- workflow
- tags
- variables
- file
- folders
- project
- datatable
status:
type: string
enum:
- new
- modified
- deleted
- created
- renamed
- conflicted
- ignored
- staged
- unknown
location:
type: string
enum:
- local
- remote
conflict:
type: boolean
updatedAt:
type: string
pushed:
type: boolean
isLocalPublished:
type: boolean
isRemoteArchived:
type: boolean
parentFolderId:
type: string
nullable: true
folderPath:
type: array
items:
type: string
owner:
type: object
required:
- type
- projectId
- projectName
properties:
type:
type: string
enum:
- personal
- team
projectId:
type: string
projectName:
type: string
publishingError:
type: string

View File

@ -24,8 +24,10 @@ Audit:
$ref: './../../../handlers/audit/spec/schemas/audit.yml'
Pull:
$ref: './../../../handlers/source-control/spec/schemas/pull.yml'
ImportResult:
$ref: './../../../handlers/source-control/spec/schemas/importResult.yml'
PullResult:
$ref: './../../../handlers/source-control/spec/schemas/pullResult.yml'
SourceControlledFile:
$ref: './../../../handlers/source-control/spec/schemas/sourceControlledFile.yml'
UserList:
$ref: './../../../handlers/users/spec/schemas/userList.yml'
User: