oc-auth/swagger/swagger.yml
2024-09-27 09:20:59 +02:00

171 lines
3.6 KiB
YAML

swagger: "2.0"
info:
title: oc-auth
description: |
OpenCloud authentication services
version: 1.0.0
termsOfService: http://cloud.o-forge.io/
contact:
email: admin@o-cloud.io
license:
name: MIT
url: https://opensource.org/license/mit
basePath: /oc
paths:
/auth/:
post:
tags:
- auth
description: |-
create auths
<br>
operationId: AuthController.Create
parameters:
- in: body
name: body
description: The auth content
required: true
schema:
type: array
items:
$ref: '#/definitions/models.auth'
responses:
"200":
description: '{string} models.auth.Id'
"403":
description: body is empty
/auth/{authId}:
get:
tags:
- auth
description: |-
find auth by authid
<br>
operationId: AuthController.Get
parameters:
- in: path
name: authId
description: the authid you want to get
required: true
type: string
responses:
"200":
description: '{auth} models.auth'
"403":
description: :authId is empty
delete:
tags:
- auth
description: |-
delete the auth
<br>
operationId: AuthController.Delete
parameters:
- in: path
name: authId
description: The authId you want to delete
required: true
type: string
responses:
"200":
description: '{string} delete success!'
"403":
description: authId is empty
/auth/discover/{url}:
get:
tags:
- auth
description: |-
find auth by authid
<br>
operationId: AuthController.Get
parameters:
- in: path
name: authId
description: the authid you want to get
required: true
type: string
responses:
"200":
description: '{auth} models.auth'
"403":
description: :authId is empty
/auth/find/{query}:
get:
tags:
- auth
description: |-
find auths with query
<br>
operationId: AuthController.Find
parameters:
- in: path
name: query
description: the keywords you need
required: true
type: string
responses:
"200":
description: '{auths} []models.auth'
"403":
description: ""
/registration/:
post:
tags:
- registration
description: |-
create auths
<br>
operationId: RegistrationController.Create
parameters:
- in: body
name: body
description: The app info
required: true
schema:
$ref: '#/definitions/models.Application'
responses:
"200":
description: '{string} models.auth.Id'
"403":
description: body is empty
/version/:
get:
tags:
- version
description: |-
get version
<br>
operationId: VersionController.GetAll
responses:
"200":
description: ""
definitions:
models.Application:
title: Application
type: object
properties:
access_token:
type: string
callback_url:
type: string
client_id:
type: string
client_name:
type: string
client_secret:
type: string
models.auth:
title: auth
type: object
tags:
- name: auth
description: |
Operations about auth
- name: registration
description: |
Operations about auth
- name: version
description: |
VersionController operations for Version