Merge pull request #1118 from techemmy/fix/resolve-api-reference-error-on-request

fix: resolve API reference failing requests
This commit is contained in:
BlackMagiq
2023-11-07 17:14:02 +02:00
committed by GitHub
4 changed files with 925 additions and 174 deletions

View File

@@ -7,7 +7,7 @@
}, },
"servers": [ "servers": [
{ {
"url": "https://infisical.com", "url": "https://app.infisical.com",
"description": "Production server" "description": "Production server"
}, },
{ {
@@ -867,64 +867,6 @@
} }
} }
}, },
"/api/v1/sso/redirect/google": {
"get": {
"description": "",
"parameters": [
{
"name": "callback_port",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/google": {
"get": {
"description": "",
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/redirect/github": {
"get": {
"description": "",
"parameters": [
{
"name": "callback_port",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/github": {
"get": {
"description": "",
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/redirect/saml2/{ssoIdentifier}": { "/api/v1/sso/redirect/saml2/{ssoIdentifier}": {
"get": { "get": {
"description": "", "description": "",
@@ -1014,6 +956,70 @@
} }
} }
}, },
"/api/v3/service-token/me/key": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v3/service-token/": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
}
},
"/api/v3/service-token/{serviceTokenDataId}": {
"patch": {
"description": "",
"parameters": [
{
"name": "serviceTokenDataId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
}
}
},
"delete": {
"description": "",
"parameters": [
{
"name": "serviceTokenDataId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/signup/email/signup": { "/api/v1/signup/email/signup": {
"post": { "post": {
"description": "", "description": "",
@@ -1200,14 +1206,6 @@
"description": "OK" "description": "OK"
} }
} }
},
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
} }
}, },
"/api/v1/organization/{organizationId}": { "/api/v1/organization/{organizationId}": {
@@ -2188,6 +2186,126 @@
} }
} }
}, },
"/api/v1/integration-auth/{integrationAuthId}/qovery/orgs": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/qovery/projects": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/qovery/environments": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/qovery/apps": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/qovery/containers": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/qovery/jobs": {
"get": {
"description": "",
"parameters": [
{
"name": "integrationAuthId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/integration-auth/{integrationAuthId}/railway/environments": { "/api/v1/integration-auth/{integrationAuthId}/railway/environments": {
"get": { "get": {
"description": "", "description": "",
@@ -2470,19 +2588,27 @@
] ]
} }
}, },
"/api/v1/folders/{folderId}": { "/api/v1/folders/{folderName}": {
"patch": { "patch": {
"summary": "Update a folder by ID", "summary": "Update a folder by ID",
"description": "Update the name of a folder in a specified workspace and environment by its ID", "description": "Update the name of a folder in a specified workspace and environment by its ID",
"parameters": [ "parameters": [
{ {
"name": "folderId", "name": "folderName",
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
}, }
"description": "ID of the folder to be updated" },
{
"name": "folderId",
"description": "ID of the folder to be updated",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
} }
], ],
"responses": { "responses": {
@@ -2565,13 +2691,21 @@
"description": "Delete the specified folder from a specified workspace and environment using its ID", "description": "Delete the specified folder from a specified workspace and environment using its ID",
"parameters": [ "parameters": [
{ {
"name": "folderId", "name": "folderName",
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"type": "string" "type": "string"
}, }
"description": "ID of the folder to be deleted" },
{
"name": "folderId",
"description": "ID of the folder to be deleted",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
} }
], ],
"responses": { "responses": {
@@ -3213,6 +3347,259 @@
} }
} }
}, },
"/api/v1/secret-approvals/": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
},
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approvals/board": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approvals/{id}": {
"patch": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/sso/redirect/google": {
"get": {
"description": "",
"parameters": [
{
"name": "callback_port",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/google": {
"get": {
"description": "",
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/redirect/github": {
"get": {
"description": "",
"parameters": [
{
"name": "callback_port",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/github": {
"get": {
"description": "",
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/redirect/gitlab": {
"get": {
"description": "",
"parameters": [
{
"name": "callback_port",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/sso/gitlab": {
"get": {
"description": "",
"responses": {
"default": {
"description": ""
}
}
}
},
"/api/v1/secret-approval-requests/": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approval-requests/count": {
"get": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approval-requests/{id}": {
"get": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approval-requests/{id}/merge": {
"post": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approval-requests/{id}/review": {
"post": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/secret-approval-requests/{id}/status": {
"post": {
"description": "",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v2/signup/complete-account/signup": { "/api/v2/signup/complete-account/signup": {
"post": { "post": {
"description": "", "description": "",
@@ -3449,36 +3836,6 @@
} }
} }
}, },
"/api/v2/users/me": {
"get": {
"summary": "Retrieve the current user on the request",
"description": "Retrieve the current user on the request",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "object",
"$ref": "#/components/schemas/CurrentUser",
"description": "Current user on request"
}
}
}
}
}
}
},
"security": [
{
"apiKeyAuth": []
}
]
}
},
"/api/v2/users/me/mfa": { "/api/v2/users/me/mfa": {
"patch": { "patch": {
"description": "", "description": "",
@@ -3600,6 +3957,44 @@
} }
} }
}, },
"/api/v2/users/me": {
"get": {
"summary": "Retrieve the current user on the request",
"description": "Retrieve the current user on the request",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "object",
"$ref": "#/components/schemas/CurrentUser",
"description": "Current user on request"
}
}
}
}
}
}
},
"security": [
{
"apiKeyAuth": []
}
]
},
"delete": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v2/organizations/{organizationId}/memberships": { "/api/v2/organizations/{organizationId}/memberships": {
"get": { "get": {
"summary": "Return organization memberships", "summary": "Return organization memberships",
@@ -3818,6 +4213,36 @@
} }
} }
}, },
"/api/v2/organizations/": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v2/organizations/{organizationId}": {
"delete": {
"description": "",
"parameters": [
{
"name": "organizationId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v2/workspace/{workspaceId}/environments": { "/api/v2/workspace/{workspaceId}/environments": {
"post": { "post": {
"summary": "Create environment", "summary": "Create environment",
@@ -5196,6 +5621,32 @@
} }
} }
}, },
"/api/v3/secrets/batch": {
"post": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
},
"patch": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
},
"delete": {
"description": "",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v3/secrets/{secretName}": { "/api/v3/secrets/{secretName}": {
"post": { "post": {
"description": "", "description": "",
@@ -5330,6 +5781,26 @@
} }
} }
}, },
"/api/v3/workspaces/{workspaceId}/service-token": {
"get": {
"description": "",
"parameters": [
{
"name": "workspaceId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v3/signup/complete-account/signup": { "/api/v3/signup/complete-account/signup": {
"post": { "post": {
"description": "", "description": "",

View File

@@ -17,7 +17,7 @@ const generateOpenAPISpec = async () => {
host: ["https://infisical.com"], host: ["https://infisical.com"],
servers: [ servers: [
{ {
url: "https://infisical.com", url: "https://app.infisical.com",
description: "Production server", description: "Production server",
}, },
{ {
@@ -111,7 +111,7 @@ const generateOpenAPISpec = async () => {
secretValueTag: "", secretValueTag: "",
secretCommentCiphertext: "", secretCommentCiphertext: "",
secretCommentIV: "", secretCommentIV: "",
secretCommentTag: "", secretCommentTag: "",
}, },
UpdateSecret: { UpdateSecret: {
id: "", id: "",
@@ -196,7 +196,7 @@ const generateOpenAPISpec = async () => {
secretKeyTag: "", secretKeyTag: "",
secretValueCiphertext: "", secretValueCiphertext: "",
secretValueIV: "", secretValueIV: "",
secretValueTag: "", secretValueTag: "",
}, },
ServiceTokenData: { ServiceTokenData: {
_id: "", _id: "",
@@ -223,7 +223,7 @@ const generateOpenAPISpec = async () => {
const endpointsFiles = ["../src/index.ts"]; const endpointsFiles = ["../src/index.ts"];
const spec = await swaggerAutogen(outputJSONFile, endpointsFiles, doc); const spec = await swaggerAutogen(outputJSONFile, endpointsFiles, doc);
await fs.writeFile(outputYAMLFile, yaml.dump(spec.data)); await fs.writeFile(outputYAMLFile, yaml.dump(spec.data));
} }

View File

@@ -27,11 +27,7 @@
"thumbsRating": true "thumbsRating": true
}, },
"api": { "api": {
"baseUrl": ["https://app.infisical.com", "http://localhost:8080"], "baseUrl": ["https://app.infisical.com", "http://localhost:8080"]
"auth": {
"method": "key",
"name": "X-API-KEY"
}
}, },
"topbarLinks": [ "topbarLinks": [
{ {

View File

@@ -4,7 +4,7 @@ info:
description: List of all available APIs that can be consumed description: List of all available APIs that can be consumed
version: 1.0.0 version: 1.0.0
servers: servers:
- url: https://infisical.com - url: https://app.infisical.com
description: Production server description: Production server
- url: http://localhost:8080 - url: http://localhost:8080
description: Local server description: Local server
@@ -534,40 +534,6 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v1/sso/redirect/google:
get:
description: ''
parameters:
- name: callback_port
in: query
schema:
type: string
responses:
default:
description: ''
/api/v1/sso/google:
get:
description: ''
responses:
default:
description: ''
/api/v1/sso/redirect/github:
get:
description: ''
parameters:
- name: callback_port
in: query
schema:
type: string
responses:
default:
description: ''
/api/v1/sso/github:
get:
description: ''
responses:
default:
description: ''
/api/v1/sso/redirect/saml2/{ssoIdentifier}: /api/v1/sso/redirect/saml2/{ssoIdentifier}:
get: get:
description: '' description: ''
@@ -622,6 +588,45 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v3/service-token/me/key:
get:
description: ''
responses:
'200':
description: OK
/api/v3/service-token/:
post:
description: ''
responses:
'200':
description: OK
'400':
description: Bad Request
/api/v3/service-token/{serviceTokenDataId}:
patch:
description: ''
parameters:
- name: serviceTokenDataId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
'400':
description: Bad Request
delete:
description: ''
parameters:
- name: serviceTokenDataId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/signup/email/signup: /api/v1/signup/email/signup:
post: post:
description: '' description: ''
@@ -735,11 +740,6 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
post:
description: ''
responses:
'200':
description: OK
/api/v1/organization/{organizationId}: /api/v1/organization/{organizationId}:
get: get:
description: '' description: ''
@@ -1330,6 +1330,78 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/orgs:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/projects:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/environments:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/apps:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/containers:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/jobs:
get:
description: ''
parameters:
- name: integrationAuthId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/integration-auth/{integrationAuthId}/railway/environments: /api/v1/integration-auth/{integrationAuthId}/railway/environments:
get: get:
description: '' description: ''
@@ -1518,19 +1590,24 @@ paths:
description: Unauthorized request. For example, 'Folder Permission Denied' description: Unauthorized request. For example, 'Folder Permission Denied'
security: security:
- apiKeyAuth: [] - apiKeyAuth: []
/api/v1/folders/{folderId}: /api/v1/folders/{folderName}:
patch: patch:
summary: Update a folder by ID summary: Update a folder by ID
description: >- description: >-
Update the name of a folder in a specified workspace and environment by Update the name of a folder in a specified workspace and environment by
its ID its ID
parameters: parameters:
- name: folderId - name: folderName
in: path in: path
required: true required: true
schema: schema:
type: string type: string
- name: folderId
description: ID of the folder to be updated description: ID of the folder to be updated
required: true
in: path
schema:
type: string
responses: responses:
'200': '200':
description: OK description: OK
@@ -1588,12 +1665,17 @@ paths:
Delete the specified folder from a specified workspace and environment Delete the specified folder from a specified workspace and environment
using its ID using its ID
parameters: parameters:
- name: folderId - name: folderName
in: path in: path
required: true required: true
schema: schema:
type: string type: string
- name: folderId
description: ID of the folder to be deleted description: ID of the folder to be deleted
required: true
in: path
schema:
type: string
responses: responses:
'200': '200':
description: OK description: OK
@@ -2005,6 +2087,157 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v1/secret-approvals/:
get:
description: ''
responses:
'200':
description: OK
post:
description: ''
responses:
'200':
description: OK
/api/v1/secret-approvals/board:
get:
description: ''
responses:
'200':
description: OK
/api/v1/secret-approvals/{id}:
patch:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
delete:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/sso/redirect/google:
get:
description: ''
parameters:
- name: callback_port
in: query
schema:
type: string
responses:
default:
description: ''
/api/v1/sso/google:
get:
description: ''
responses:
default:
description: ''
/api/v1/sso/redirect/github:
get:
description: ''
parameters:
- name: callback_port
in: query
schema:
type: string
responses:
default:
description: ''
/api/v1/sso/github:
get:
description: ''
responses:
default:
description: ''
/api/v1/sso/redirect/gitlab:
get:
description: ''
parameters:
- name: callback_port
in: query
schema:
type: string
responses:
default:
description: ''
/api/v1/sso/gitlab:
get:
description: ''
responses:
default:
description: ''
/api/v1/secret-approval-requests/:
get:
description: ''
responses:
'200':
description: OK
/api/v1/secret-approval-requests/count:
get:
description: ''
responses:
'200':
description: OK
/api/v1/secret-approval-requests/{id}:
get:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/secret-approval-requests/{id}/merge:
post:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/secret-approval-requests/{id}/review:
post:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v1/secret-approval-requests/{id}/status:
post:
description: ''
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v2/signup/complete-account/signup: /api/v2/signup/complete-account/signup:
post: post:
description: '' description: ''
@@ -2149,24 +2382,6 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v2/users/me:
get:
summary: Retrieve the current user on the request
description: Retrieve the current user on the request
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
user:
type: object
$ref: '#/components/schemas/CurrentUser'
description: Current user on request
security:
- apiKeyAuth: []
/api/v2/users/me/mfa: /api/v2/users/me/mfa:
patch: patch:
description: '' description: ''
@@ -2240,6 +2455,29 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v2/users/me:
get:
summary: Retrieve the current user on the request
description: Retrieve the current user on the request
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
user:
type: object
$ref: '#/components/schemas/CurrentUser'
description: Current user on request
security:
- apiKeyAuth: []
delete:
description: ''
responses:
'200':
description: OK
/api/v2/organizations/{organizationId}/memberships: /api/v2/organizations/{organizationId}/memberships:
get: get:
summary: Return organization memberships summary: Return organization memberships
@@ -2375,6 +2613,24 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v2/organizations/:
post:
description: ''
responses:
'200':
description: OK
/api/v2/organizations/{organizationId}:
delete:
description: ''
parameters:
- name: organizationId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v2/workspace/{workspaceId}/environments: /api/v2/workspace/{workspaceId}/environments:
post: post:
summary: Create environment summary: Create environment
@@ -3228,6 +3484,22 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v3/secrets/batch:
post:
description: ''
responses:
'200':
description: OK
patch:
description: ''
responses:
'200':
description: OK
delete:
description: ''
responses:
'200':
description: OK
/api/v3/secrets/{secretName}: /api/v3/secrets/{secretName}:
post: post:
description: '' description: ''
@@ -3309,6 +3581,18 @@ paths:
responses: responses:
'200': '200':
description: OK description: OK
/api/v3/workspaces/{workspaceId}/service-token:
get:
description: ''
parameters:
- name: workspaceId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
/api/v3/signup/complete-account/signup: /api/v3/signup/complete-account/signup:
post: post:
description: '' description: ''