oc-auth/swagger/swagger.yml

171 lines
3.6 KiB
YAML
Raw Normal View History

2024-07-26 13:46:05 +02:00
swagger: "2.0"
info:
2024-09-27 09:20:59 +02:00
title: oc-auth
2024-07-26 13:46:05 +02:00
description: |
2024-09-27 09:20:59 +02:00
OpenCloud authentication services
2024-07-26 13:46:05 +02:00
version: 1.0.0
2024-09-27 09:20:59 +02:00
termsOfService: http://cloud.o-forge.io/
2024-07-26 13:46:05 +02:00
contact:
2024-09-27 09:20:59 +02:00
email: admin@o-cloud.io
2024-07-26 13:46:05 +02:00
license:
2024-09-27 09:20:59 +02:00
name: MIT
url: https://opensource.org/license/mit
2024-07-26 13:46:05 +02:00
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
2024-09-27 09:20:59 +02:00
/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
2024-07-26 13:46:05 +02:00
/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: ""
2024-09-27 09:20:59 +02:00
/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: ""
2024-07-26 13:46:05 +02:00
definitions:
2024-09-27 09:20:59 +02:00
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
2024-07-26 13:46:05 +02:00
models.auth:
title: auth
type: object
tags:
- name: auth
description: |
Operations about auth
2024-09-27 09:20:59 +02:00
- name: registration
description: |
Operations about auth
2024-07-26 13:46:05 +02:00
- name: version
description: |
VersionController operations for Version