[SWAGGER] Minor Swagger Fix and yarn services (#506)

This commit is contained in:
Johannes Batzill 2023-09-15 18:59:34 +00:00 committed by Harness
parent 300518806e
commit ac87d06e5e
5 changed files with 306 additions and 626 deletions

View File

@ -2,6 +2,7 @@ package space
import (
"context"
apiauth "github.com/harness/gitness/internal/api/auth"
"github.com/harness/gitness/internal/auth"
"github.com/harness/gitness/types"
@ -9,7 +10,7 @@ import (
)
type ExportProgressOutput struct {
JobProgress []types.JobProgress `json:"job_progress"`
Repos []types.JobProgress `json:"repos"`
}
// ExportProgress returns progress of the export job.
@ -30,5 +31,5 @@ func (c *Controller) ExportProgress(ctx context.Context,
if err != nil {
return ExportProgressOutput{}, err
}
return ExportProgressOutput{JobProgress: progress}, nil
return ExportProgressOutput{Repos: progress}, nil
}

View File

@ -52,7 +52,6 @@ var queryParameterSortRepo = openapi3.ParameterOrRef{
Default: ptrptr(enum.RepoAttrUID.String()),
Enum: []interface{}{
ptr.String(enum.RepoAttrUID.String()),
ptr.String(enum.RepoAttrPath.String()),
ptr.String(enum.RepoAttrCreated.String()),
ptr.String(enum.RepoAttrUpdated.String()),
},

View File

@ -16,6 +16,22 @@ const (
JobStateCanceled JobState = "canceled"
)
var jobStates = sortEnum([]JobState{
JobStateScheduled,
JobStateRunning,
JobStateFinished,
JobStateFailed,
JobStateCanceled,
})
func (JobState) Enum() []interface{} { return toInterfaceSlice(jobStates) }
func (s JobState) Sanitize() (JobState, bool) {
return Sanitize(s, GetAllJobStates)
}
func GetAllJobStates() ([]JobState, JobState) {
return jobStates, ""
}
// JobPriority represents priority of a background job.
type JobPriority int

View File

@ -13,6 +13,8 @@ export type EnumCheckStatus = 'error' | 'failure' | 'pending' | 'running' | 'suc
export type EnumContentEncodingType = 'base64' | 'utf8'
export type EnumJobState = 'canceled' | 'failed' | 'finished' | 'running' | 'scheduled'
export type EnumMembershipRole = 'contributor' | 'executor' | 'reader' | 'space_owner'
export type EnumMergeCheckStatus = string
@ -21,8 +23,6 @@ export type EnumMergeMethod = 'merge' | 'squash' | 'rebase'
export type EnumParentResourceType = 'space' | 'repo'
export type EnumPathTargetType = string
export type EnumPrincipalType = 'service' | 'serviceaccount' | 'user'
export type EnumPullReqActivityKind = 'change-comment' | 'comment' | 'system'
@ -203,14 +203,11 @@ export interface OpenapiCreateConnectorRequest {
uid?: string
}
export interface OpenapiCreatePathRequest {
path?: string
}
export interface OpenapiCreatePipelineRequest {
config_path?: string
default_branch?: string
description?: string
disabled?: boolean
uid?: string
}
@ -223,10 +220,6 @@ export interface OpenapiCreatePullReqRequest {
title?: string
}
export interface OpenapiCreateRepoPathRequest {
path?: string
}
export interface OpenapiCreateRepositoryRequest {
default_branch?: string
description?: string
@ -294,6 +287,13 @@ export interface OpenapiDirContent {
entries?: OpenapiContentInfo[] | null
}
export interface OpenapiExportSpaceRequest {
accountId?: string
orgIdentifier?: string
projectIdentifier?: string
token?: string
}
export interface OpenapiGetContentOutput {
content?: OpenapiContent
latest_commit?: TypesCommit
@ -314,14 +314,10 @@ export interface OpenapiMergePullReq {
}
export interface OpenapiMoveRepoRequest {
keep_as_alias?: boolean
parent_ref?: string | null
uid?: string | null
}
export interface OpenapiMoveSpaceRequest {
keep_as_alias?: boolean
parent_ref?: string | null
uid?: string | null
}
@ -357,15 +353,16 @@ export interface OpenapiUpdateAdminRequest {
}
export interface OpenapiUpdateConnectorRequest {
data?: string
description?: string
uid?: string
data?: string | null
description?: string | null
uid?: string | null
}
export interface OpenapiUpdatePipelineRequest {
config_path?: string
description?: string
uid?: string
config_path?: string | null
description?: string | null
disabled?: boolean | null
uid?: string | null
}
export interface OpenapiUpdatePullReqRequest {
@ -379,9 +376,9 @@ export interface OpenapiUpdateRepoRequest {
}
export interface OpenapiUpdateSecretRequest {
data?: string
description?: string
uid?: string
data?: string | null
description?: string | null
uid?: string | null
}
export interface OpenapiUpdateSpaceRequest {
@ -390,9 +387,9 @@ export interface OpenapiUpdateSpaceRequest {
}
export interface OpenapiUpdateTemplateRequest {
data?: string
description?: string
uid?: string
data?: string | null
description?: string | null
uid?: string | null
}
export interface OpenapiUpdateTriggerRequest {
@ -508,6 +505,10 @@ export interface RepoSymlinkContent {
target?: string
}
export interface SpaceExportProgressOutput {
repos?: TypesJobProgress[] | null
}
export interface SystemConfigOutput {
user_signup_allowed?: boolean
}
@ -613,6 +614,13 @@ export interface TypesIdentity {
name?: string
}
export interface TypesJobProgress {
failure?: string
progress?: number
result?: string
state?: EnumJobState
}
export interface TypesListCommitResponse {
commits?: TypesCommit[] | null
rename_details?: TypesRenameDetails[] | null
@ -640,17 +648,6 @@ export interface TypesMergeResponse {
sha?: string
}
export interface TypesPath {
created?: number
created_by?: number
id?: number
is_primary?: boolean
target_id?: number
target_type?: EnumPathTargetType
updated?: number
value?: string
}
export interface TypesPipeline {
config_path?: string
created?: number
@ -2167,111 +2164,6 @@ export const usePathDetails = ({ repo_ref, ...props }: UsePathDetailsProps) =>
...props
})
export interface ListRepositoryPathsQueryParams {
/**
* The page to return.
*/
page?: number
/**
* The maximum number of results to return.
*/
limit?: number
}
export interface ListRepositoryPathsPathParams {
repo_ref: string
}
export type ListRepositoryPathsProps = Omit<
GetProps<TypesPath[], UsererrorError, ListRepositoryPathsQueryParams, ListRepositoryPathsPathParams>,
'path'
> &
ListRepositoryPathsPathParams
export const ListRepositoryPaths = ({ repo_ref, ...props }: ListRepositoryPathsProps) => (
<Get<TypesPath[], UsererrorError, ListRepositoryPathsQueryParams, ListRepositoryPathsPathParams>
path={`/repos/${repo_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseListRepositoryPathsProps = Omit<
UseGetProps<TypesPath[], UsererrorError, ListRepositoryPathsQueryParams, ListRepositoryPathsPathParams>,
'path'
> &
ListRepositoryPathsPathParams
export const useListRepositoryPaths = ({ repo_ref, ...props }: UseListRepositoryPathsProps) =>
useGet<TypesPath[], UsererrorError, ListRepositoryPathsQueryParams, ListRepositoryPathsPathParams>(
(paramsInPath: ListRepositoryPathsPathParams) => `/repos/${paramsInPath.repo_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props }
)
export interface CreateRepositoryPathPathParams {
repo_ref: string
}
export type CreateRepositoryPathProps = Omit<
MutateProps<TypesPath, UsererrorError, void, OpenapiCreateRepoPathRequest, CreateRepositoryPathPathParams>,
'path' | 'verb'
> &
CreateRepositoryPathPathParams
export const CreateRepositoryPath = ({ repo_ref, ...props }: CreateRepositoryPathProps) => (
<Mutate<TypesPath, UsererrorError, void, OpenapiCreateRepoPathRequest, CreateRepositoryPathPathParams>
verb="POST"
path={`/repos/${repo_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseCreateRepositoryPathProps = Omit<
UseMutateProps<TypesPath, UsererrorError, void, OpenapiCreateRepoPathRequest, CreateRepositoryPathPathParams>,
'path' | 'verb'
> &
CreateRepositoryPathPathParams
export const useCreateRepositoryPath = ({ repo_ref, ...props }: UseCreateRepositoryPathProps) =>
useMutate<TypesPath, UsererrorError, void, OpenapiCreateRepoPathRequest, CreateRepositoryPathPathParams>(
'POST',
(paramsInPath: CreateRepositoryPathPathParams) => `/repos/${paramsInPath.repo_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props }
)
export interface DeleteRepositoryPathPathParams {
repo_ref: string
}
export type DeleteRepositoryPathProps = Omit<
MutateProps<void, UsererrorError, void, string, DeleteRepositoryPathPathParams>,
'path' | 'verb'
> &
DeleteRepositoryPathPathParams
export const DeleteRepositoryPath = ({ repo_ref, ...props }: DeleteRepositoryPathProps) => (
<Mutate<void, UsererrorError, void, string, DeleteRepositoryPathPathParams>
verb="DELETE"
path={`/repos/${repo_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseDeleteRepositoryPathProps = Omit<
UseMutateProps<void, UsererrorError, void, string, DeleteRepositoryPathPathParams>,
'path' | 'verb'
> &
DeleteRepositoryPathPathParams
export const useDeleteRepositoryPath = ({ repo_ref, ...props }: UseDeleteRepositoryPathProps) =>
useMutate<void, UsererrorError, void, string, DeleteRepositoryPathPathParams>(
'DELETE',
(paramsInPath: DeleteRepositoryPathPathParams) => `/repos/${paramsInPath.repo_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { repo_ref }, ...props }
)
export interface ListPipelinesQueryParams {
/**
* The substring which is used to filter the repositories by their path name.
@ -4386,6 +4278,68 @@ export const useListConnectors = ({ space_ref, ...props }: UseListConnectorsProp
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface ExportSpacePathParams {
space_ref: string
}
export type ExportSpaceProps = Omit<
MutateProps<void, UsererrorError, void, OpenapiExportSpaceRequest, ExportSpacePathParams>,
'path' | 'verb'
> &
ExportSpacePathParams
export const ExportSpace = ({ space_ref, ...props }: ExportSpaceProps) => (
<Mutate<void, UsererrorError, void, OpenapiExportSpaceRequest, ExportSpacePathParams>
verb="POST"
path={`/spaces/${space_ref}/export`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseExportSpaceProps = Omit<
UseMutateProps<void, UsererrorError, void, OpenapiExportSpaceRequest, ExportSpacePathParams>,
'path' | 'verb'
> &
ExportSpacePathParams
export const useExportSpace = ({ space_ref, ...props }: UseExportSpaceProps) =>
useMutate<void, UsererrorError, void, OpenapiExportSpaceRequest, ExportSpacePathParams>(
'POST',
(paramsInPath: ExportSpacePathParams) => `/spaces/${paramsInPath.space_ref}/export`,
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface ExportProgressSpacePathParams {
space_ref: string
}
export type ExportProgressSpaceProps = Omit<
GetProps<SpaceExportProgressOutput, UsererrorError, void, ExportProgressSpacePathParams>,
'path'
> &
ExportProgressSpacePathParams
export const ExportProgressSpace = ({ space_ref, ...props }: ExportProgressSpaceProps) => (
<Get<SpaceExportProgressOutput, UsererrorError, void, ExportProgressSpacePathParams>
path={`/spaces/${space_ref}/export-progress`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseExportProgressSpaceProps = Omit<
UseGetProps<SpaceExportProgressOutput, UsererrorError, void, ExportProgressSpacePathParams>,
'path'
> &
ExportProgressSpacePathParams
export const useExportProgressSpace = ({ space_ref, ...props }: UseExportProgressSpaceProps) =>
useGet<SpaceExportProgressOutput, UsererrorError, void, ExportProgressSpacePathParams>(
(paramsInPath: ExportProgressSpacePathParams) => `/spaces/${paramsInPath.space_ref}/export-progress`,
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface MembershipListQueryParams {
/**
* The substring by which the space members are filtered.
@ -4577,111 +4531,6 @@ export const useMoveSpace = ({ space_ref, ...props }: UseMoveSpaceProps) =>
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface ListPathsQueryParams {
/**
* The page to return.
*/
page?: number
/**
* The maximum number of results to return.
*/
limit?: number
}
export interface ListPathsPathParams {
space_ref: string
}
export type ListPathsProps = Omit<
GetProps<TypesPath[], UsererrorError, ListPathsQueryParams, ListPathsPathParams>,
'path'
> &
ListPathsPathParams
export const ListPaths = ({ space_ref, ...props }: ListPathsProps) => (
<Get<TypesPath[], UsererrorError, ListPathsQueryParams, ListPathsPathParams>
path={`/spaces/${space_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseListPathsProps = Omit<
UseGetProps<TypesPath[], UsererrorError, ListPathsQueryParams, ListPathsPathParams>,
'path'
> &
ListPathsPathParams
export const useListPaths = ({ space_ref, ...props }: UseListPathsProps) =>
useGet<TypesPath[], UsererrorError, ListPathsQueryParams, ListPathsPathParams>(
(paramsInPath: ListPathsPathParams) => `/spaces/${paramsInPath.space_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface CreatePathPathParams {
space_ref: string
}
export type CreatePathProps = Omit<
MutateProps<TypesPath, UsererrorError, void, OpenapiCreatePathRequest, CreatePathPathParams>,
'path' | 'verb'
> &
CreatePathPathParams
export const CreatePath = ({ space_ref, ...props }: CreatePathProps) => (
<Mutate<TypesPath, UsererrorError, void, OpenapiCreatePathRequest, CreatePathPathParams>
verb="POST"
path={`/spaces/${space_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseCreatePathProps = Omit<
UseMutateProps<TypesPath, UsererrorError, void, OpenapiCreatePathRequest, CreatePathPathParams>,
'path' | 'verb'
> &
CreatePathPathParams
export const useCreatePath = ({ space_ref, ...props }: UseCreatePathProps) =>
useMutate<TypesPath, UsererrorError, void, OpenapiCreatePathRequest, CreatePathPathParams>(
'POST',
(paramsInPath: CreatePathPathParams) => `/spaces/${paramsInPath.space_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface DeletePathPathParams {
space_ref: string
}
export type DeletePathProps = Omit<
MutateProps<void, UsererrorError, void, string, DeletePathPathParams>,
'path' | 'verb'
> &
DeletePathPathParams
export const DeletePath = ({ space_ref, ...props }: DeletePathProps) => (
<Mutate<void, UsererrorError, void, string, DeletePathPathParams>
verb="DELETE"
path={`/spaces/${space_ref}/paths`}
base={getConfig('code/api/v1')}
{...props}
/>
)
export type UseDeletePathProps = Omit<
UseMutateProps<void, UsererrorError, void, string, DeletePathPathParams>,
'path' | 'verb'
> &
DeletePathPathParams
export const useDeletePath = ({ space_ref, ...props }: UseDeletePathProps) =>
useMutate<void, UsererrorError, void, string, DeletePathPathParams>(
'DELETE',
(paramsInPath: DeletePathPathParams) => `/spaces/${paramsInPath.space_ref}/paths`,
{ base: getConfig('code/api/v1'), pathParams: { space_ref }, ...props }
)
export interface ListReposQueryParams {
/**
* The substring which is used to filter the repositories by their path name.
@ -4690,7 +4539,7 @@ export interface ListReposQueryParams {
/**
* The data by which the repositories are sorted.
*/
sort?: 'uid' | 'path' | 'created' | 'updated'
sort?: 'uid' | 'created' | 'updated'
/**
* The order of the output.
*/
@ -4818,7 +4667,7 @@ export interface ListSpacesQueryParams {
/**
* The data by which the spaces are sorted.
*/
sort?: 'uid' | 'path' | 'created' | 'updated'
sort?: 'uid' | 'created' | 'updated'
/**
* The order of the output.
*/
@ -5105,7 +4954,7 @@ export interface MembershipSpacesQueryParams {
/**
* The field by which the spaces the user is a member of are sorted.
*/
sort?: 'created' | 'path' | 'uid'
sort?: 'created' | 'uid'
/**
* The page to return.
*/

View File

@ -549,7 +549,8 @@ paths:
required: false
schema:
type: string
- description: The account ID the principals are retrieved for (Not required
- description:
The account ID the principals are retrieved for (Not required
in standalone).
in: query
name: accountIdentifier
@ -835,7 +836,8 @@ paths:
get:
operationId: getBlame
parameters:
- description: The git reference (branch / tag / commitID) that will be used
- description:
The git reference (branch / tag / commitID) that will be used
to retrieve the data. If no value is provided the default branch of the
repository is used.
in: query
@ -907,7 +909,8 @@ paths:
get:
operationId: listBranches
parameters:
- description: Indicates whether optional commit information should be included
- description:
Indicates whether optional commit information should be included
in the response.
in: query
name: include_commit
@ -1265,7 +1268,8 @@ paths:
get:
operationId: listCommits
parameters:
- description: The git reference (branch / tag / commitID) that will be used
- description:
The git reference (branch / tag / commitID) that will be used
to retrieve the data. If no value is provided the default branch of the
repository is used.
in: query
@ -1274,7 +1278,8 @@ paths:
schema:
default: '{Repository Default Branch}'
type: string
- description: The result should only contain commits that occurred after the
- description:
The result should only contain commits that occurred after the
provided reference.
in: query
name: after
@ -1515,7 +1520,8 @@ paths:
get:
operationId: getContent
parameters:
- description: The git reference (branch / tag / commitID) that will be used
- description:
The git reference (branch / tag / commitID) that will be used
to retrieve the data. If no value is provided the default branch of the
repository is used.
in: query
@ -1524,7 +1530,8 @@ paths:
schema:
default: '{Repository Default Branch}'
type: string
- description: Indicates whether optional commit information should be included
- description:
Indicates whether optional commit information should be included
in the response.
in: query
name: include_commit
@ -1757,7 +1764,8 @@ paths:
post:
operationId: pathDetails
parameters:
- description: The git reference (branch / tag / commitID) that will be used
- description:
The git reference (branch / tag / commitID) that will be used
to retrieve the data. If no value is provided the default branch of the
repository is used.
in: query
@ -1809,161 +1817,12 @@ paths:
description: Internal Server Error
tags:
- repository
/repos/{repo_ref}/paths:
get:
operationId: listRepositoryPaths
parameters:
- description: The page to return.
in: query
name: page
required: false
schema:
default: 1
minimum: 1
type: integer
- description: The maximum number of results to return.
in: query
name: limit
required: false
schema:
default: 30
maximum: 100
minimum: 1
type: integer
- in: path
name: repo_ref
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/TypesPath'
type: array
description: OK
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Not Found
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- repository
post:
operationId: createRepositoryPath
parameters:
- in: path
name: repo_ref
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenapiCreateRepoPathRequest'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TypesPath'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- repository
/repos/{repo_ref}/paths/{path_id}:
delete:
operationId: deleteRepositoryPath
parameters:
- in: path
name: repo_ref
required: true
schema:
type: string
- in: path
name: path_id
required: true
schema:
type: string
responses:
'204':
description: No Content
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Not Found
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- repository
/repos/{repo_ref}/pipelines:
get:
operationId: listPipelines
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -2442,8 +2301,8 @@ paths:
description: Internal Server Error
tags:
- pipeline
/repos/{repo_ref}/pipelines/{pipeline_uid}/executions/{execution_number}/cancel:
post:
? /repos/{repo_ref}/pipelines/{pipeline_uid}/executions/{execution_number}/cancel
: post:
operationId: cancelExecution
parameters:
- in: path
@ -2494,8 +2353,8 @@ paths:
description: Internal Server Error
tags:
- pipeline
/repos/{repo_ref}/pipelines/{pipeline_uid}/executions/{execution_number}/logs/{stage_number}/{step_number}:
get:
? /repos/{repo_ref}/pipelines/{pipeline_uid}/executions/{execution_number}/logs/{stage_number}/{step_number}
: get:
operationId: viewLogs
parameters:
- in: path
@ -2562,7 +2421,8 @@ paths:
get:
operationId: listTriggers
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -3146,7 +3006,8 @@ paths:
- title-change
type: string
type: array
- description: The result should contain only entries created at and after this
- description:
The result should contain only entries created at and after this
timestamp (unix millis).
in: query
name: after
@ -3154,7 +3015,8 @@ paths:
schema:
minimum: 0
type: integer
- description: The result should contain only entries created before this timestamp
- description:
The result should contain only entries created before this timestamp
(unix millis).
in: query
name: before
@ -3372,8 +3234,8 @@ paths:
description: Internal Server Error
tags:
- pullreq
/repos/{repo_ref}/pullreq/{pullreq_number}/comments/{pullreq_comment_id}/status:
put:
? /repos/{repo_ref}/pullreq/{pullreq_number}/comments/{pullreq_comment_id}/status
: put:
operationId: commentStatusPullReq
parameters:
- in: path
@ -3864,7 +3726,8 @@ paths:
get:
operationId: getRaw
parameters:
- description: The git reference (branch / tag / commitID) that will be used
- description:
The git reference (branch / tag / commitID) that will be used
to retrieve the data. If no value is provided the default branch of the
repository is used.
in: query
@ -3960,7 +3823,8 @@ paths:
get:
operationId: listTags
parameters:
- description: Indicates whether optional commit information should be included
- description:
Indicates whether optional commit information should be included
in the response.
in: query
name: include_commit
@ -4156,7 +4020,8 @@ paths:
get:
operationId: listWebhooks
parameters:
- description: The substring which is used to filter the spaces by their path
- description:
The substring which is used to filter the spaces by their path
name.
in: query
name: query
@ -5040,7 +4905,8 @@ paths:
get:
operationId: listConnectors
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -5104,6 +4970,91 @@ paths:
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/export:
post:
operationId: exportSpace
parameters:
- in: path
name: space_ref
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenapiExportSpaceRequest'
responses:
'202':
description: Accepted
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/export-progress:
get:
operationId: exportProgressSpace
parameters:
- in: path
name: space_ref
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SpaceExportProgressOutput'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/members:
get:
operationId: membershipList
@ -5386,161 +5337,12 @@ paths:
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/paths:
get:
operationId: listPaths
parameters:
- description: The page to return.
in: query
name: page
required: false
schema:
default: 1
minimum: 1
type: integer
- description: The maximum number of results to return.
in: query
name: limit
required: false
schema:
default: 30
maximum: 100
minimum: 1
type: integer
- in: path
name: space_ref
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/TypesPath'
type: array
description: OK
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Not Found
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- space
post:
operationId: createPath
parameters:
- in: path
name: space_ref
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenapiCreatePathRequest'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TypesPath'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Bad Request
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/paths/{path_id}:
delete:
operationId: deletePath
parameters:
- in: path
name: space_ref
required: true
schema:
type: string
- in: path
name: path_id
required: true
schema:
type: string
responses:
'204':
description: No Content
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Unauthorized
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Not Found
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/UsererrorError'
description: Internal Server Error
tags:
- space
/spaces/{space_ref}/repos:
get:
operationId: listRepos
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -5555,7 +5357,6 @@ paths:
default: uid
enum:
- uid
- path
- created
- updated
type: string
@ -5630,7 +5431,8 @@ paths:
get:
operationId: listSecrets
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -5742,7 +5544,8 @@ paths:
get:
operationId: listSpaces
parameters:
- description: The substring which is used to filter the spaces by their path
- description:
The substring which is used to filter the spaces by their path
name.
in: query
name: query
@ -5757,7 +5560,6 @@ paths:
default: uid
enum:
- uid
- path
- created
- updated
type: string
@ -5832,7 +5634,8 @@ paths:
get:
operationId: listTemplates
parameters:
- description: The substring which is used to filter the repositories by their
- description:
The substring which is used to filter the repositories by their
path name.
in: query
name: query
@ -6190,7 +5993,8 @@ paths:
get:
operationId: membershipSpaces
parameters:
- description: The substring by which the spaces the users is a member of are
- description:
The substring by which the spaces the users is a member of are
filtered.
in: query
name: query
@ -6215,7 +6019,6 @@ paths:
default: uid
enum:
- created
- path
- uid
type: string
- description: The page to return.
@ -6277,8 +6080,6 @@ paths:
- user
components:
schemas:
EnumAccessGrant:
type: integer
EnumCIStatus:
type: string
EnumCheckPayloadKind:
@ -6301,6 +6102,14 @@ components:
- base64
- utf8
type: string
EnumJobState:
enum:
- canceled
- failed
- finished
- running
- scheduled
type: string
EnumMembershipRole:
enum:
- contributor
@ -6321,8 +6130,6 @@ components:
- space
- repo
type: string
EnumPathTargetType:
type: string
EnumPrincipalType:
enum:
- service
@ -6642,11 +6449,6 @@ components:
uid:
type: string
type: object
OpenapiCreatePathRequest:
properties:
path:
type: string
type: object
OpenapiCreatePipelineRequest:
properties:
config_path:
@ -6655,6 +6457,8 @@ components:
type: string
description:
type: string
disabled:
type: boolean
uid:
type: string
type: object
@ -6673,11 +6477,6 @@ components:
title:
type: string
type: object
OpenapiCreateRepoPathRequest:
properties:
path:
type: string
type: object
OpenapiCreateRepositoryRequest:
properties:
default_branch:
@ -6794,6 +6593,17 @@ components:
nullable: true
type: array
type: object
OpenapiExportSpaceRequest:
properties:
accountId:
type: string
orgIdentifier:
type: string
projectIdentifier:
type: string
token:
type: string
type: object
OpenapiGetContentOutput:
properties:
content:
@ -6825,22 +6635,12 @@ components:
type: object
OpenapiMoveRepoRequest:
properties:
keep_as_alias:
type: boolean
parent_ref:
nullable: true
type: string
uid:
nullable: true
type: string
type: object
OpenapiMoveSpaceRequest:
properties:
keep_as_alias:
type: boolean
parent_ref:
nullable: true
type: string
uid:
nullable: true
type: string
@ -6895,19 +6695,28 @@ components:
OpenapiUpdateConnectorRequest:
properties:
data:
nullable: true
type: string
description:
nullable: true
type: string
uid:
nullable: true
type: string
type: object
OpenapiUpdatePipelineRequest:
properties:
config_path:
nullable: true
type: string
description:
nullable: true
type: string
disabled:
nullable: true
type: boolean
uid:
nullable: true
type: string
type: object
OpenapiUpdatePullReqRequest:
@ -6929,10 +6738,13 @@ components:
OpenapiUpdateSecretRequest:
properties:
data:
nullable: true
type: string
description:
nullable: true
type: string
uid:
nullable: true
type: string
type: object
OpenapiUpdateSpaceRequest:
@ -6947,10 +6759,13 @@ components:
OpenapiUpdateTemplateRequest:
properties:
data:
nullable: true
type: string
description:
nullable: true
type: string
uid:
nullable: true
type: string
type: object
OpenapiUpdateTriggerRequest:
@ -7151,6 +6966,14 @@ components:
target:
type: string
type: object
SpaceExportProgressOutput:
properties:
repos:
items:
$ref: '#/components/schemas/TypesJobProgress'
nullable: true
type: array
type: object
SystemConfigOutput:
properties:
user_signup_allowed:
@ -7331,6 +7154,17 @@ components:
name:
type: string
type: object
TypesJobProgress:
properties:
failure:
type: string
progress:
type: integer
result:
type: string
state:
$ref: '#/components/schemas/EnumJobState'
type: object
TypesListCommitResponse:
properties:
commits:
@ -7381,25 +7215,6 @@ components:
sha:
type: string
type: object
TypesPath:
properties:
created:
type: integer
created_by:
type: integer
id:
type: integer
is_primary:
type: boolean
target_id:
type: integer
target_type:
$ref: '#/components/schemas/EnumPathTargetType'
updated:
type: integer
value:
type: string
type: object
TypesPipeline:
properties:
config_path: