Config and swagger upgrade

This commit is contained in:
ycc
2024-09-27 09:20:59 +02:00
parent 6f4a51e28e
commit 9bb7cd77c0
10 changed files with 799 additions and 205 deletions

View File

@@ -1,28 +1,17 @@
swagger: "2.0"
info:
title: beego Test API
title: oc-auth
description: |
beego has a very cool tools to autogenerate documents for your API
OpenCloud authentication services
version: 1.0.0
termsOfService: http://beego.me/
termsOfService: http://cloud.o-forge.io/
contact:
email: astaxie@gmail.com
email: admin@o-cloud.io
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
name: MIT
url: https://opensource.org/license/mit
basePath: /oc
paths:
/version/:
get:
tags:
- version
description: |-
get version
<br>
operationId: VersionController.GetAll
responses:
"200":
description: ""
/auth/:
post:
tags:
@@ -82,6 +71,25 @@ paths:
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:
@@ -101,7 +109,52 @@ paths:
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
@@ -109,6 +162,9 @@ tags:
- name: auth
description: |
Operations about auth
- name: registration
description: |
Operations about auth
- name: version
description: |
VersionController operations for Version