Skip to content

Commit

Permalink
fix: use openapi yml instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mistahj67 committed Nov 27, 2024
1 parent d9dbfa0 commit f9f92ae
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 81 deletions.
16 changes: 16 additions & 0 deletions packages/go/analysis/post_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2024 Specter Ops, Inc.
//
// Licensed under the Apache License, Version 2.0
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

//go:build serial_integration
// +build serial_integration

Expand Down
160 changes: 80 additions & 80 deletions packages/go/openapi/doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -646,100 +646,100 @@
}
}
],
"patch": {
"patch": {
"operationId": "PatchSSOProvider",
"summary": "Update SSO Provider",
"description": "Updates an existing SSO provider. Updating saml provider requires a \"multipart/form-data\" body. Updating oidc provider requires \"application/json\" body. Response is respective provider",
"tags": [
"Auth",
"Community",
"Enterprise"
"Auth",
"Community",
"Enterprise"
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"name": {
"type": "string",
"description": "Name of the new SAML provider."
},
"metadata": {
"type": "string",
"format": "binary",
"description": "Metadata XML file."
}
}
}
},
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the OIDC provider"
},
"issuer": {
"type": "string",
"format": "url",
"description": "URL of the OIDC issuer"
},
"client_id": {
"type": "string",
"description": "Client ID for the OIDC provider"
}
}
}
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"name": {
"type": "string",
"description": "Name of the new SAML provider."
},
"metadata": {
"type": "string",
"format": "binary",
"description": "Metadata XML file."
}
}
}
},
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the OIDC provider"
},
"issuer": {
"type": "string",
"format": "url",
"description": "URL of the OIDC issuer"
},
"client_id": {
"type": "string",
"description": "Client ID for the OIDC provider"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/model.saml-provider"
}
}
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/model.oidc-provider"
}
}
}
]
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/model.saml-provider"
}
}
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/model.oidc-provider"
}
}
}
]
}
},
"401": {
"$ref": "#/components/responses/unauthorized"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not-found"
},
"429": {
"$ref": "#/components/responses/too-many-requests"
},
"500": {
"$ref": "#/components/responses/internal-server-error"
}
}
},
"401": {
"$ref": "#/components/responses/unauthorized"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not-found"
},
"429": {
"$ref": "#/components/responses/too-many-requests"
},
"500": {
"$ref": "#/components/responses/internal-server-error"
}
}
},
},
"delete": {
"operationId": "DeleteSSOProvider",
"summary": "Delete SSO Provider",
Expand Down Expand Up @@ -16404,4 +16404,4 @@
]
}
]
}
}
60 changes: 60 additions & 0 deletions packages/go/openapi/src/paths/sso.sso-providers.id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,66 @@ parameters:
schema:
type: integer
format: int32
patch:
operationId: PatchSSOProvider
summary: Update SSO Provider
description: Updates an existing SSO provider. Updating saml provider requires a "multipart/form-data" body. Updating oidc provider requires "application/json" body. Response is respective provider
tags:
- Auth
- Community
- Enterprise
requestBody:
required: true
content:
multipart/form-data:
schema:
properties:
name:
type: string
description: Name of the new SAML provider.
metadata:
type: string
format: binary
description: Metadata XML file.
application/json:
schema:
type: object
properties:
name:
type: string
description: Name of the OIDC provider
issuer:
type: string
format: url
description: URL of the OIDC issuer
client_id:
type: string
description: Client ID for the OIDC provider
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- type: object
properties:
data:
$ref: './../schemas/model.saml-provider.yaml'
- type: object
properties:
data:
$ref: './../schemas/model.oidc-provider.yaml'
'401':
$ref: './../responses/unauthorized.yaml'
'403':
$ref: './../responses/forbidden.yaml'
'404':
$ref: './../responses/not-found.yaml'
'429':
$ref: './../responses/too-many-requests.yaml'
'500':
$ref: './../responses/internal-server-error.yaml'
delete:
operationId: DeleteSSOProvider
summary: Delete SSO Provider
Expand Down
2 changes: 1 addition & 1 deletion packages/go/openapi/src/paths/sso.sso-providers.oidc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ post:
type: object
properties:
data:
$ref: './../schemas/model.auth-provider.yaml'
$ref: './../schemas/model.oidc-provider.yaml'
'400':
$ref: './../responses/bad-request.yaml'
'401':
Expand Down

0 comments on commit f9f92ae

Please sign in to comment.