update to openapi 3.0

easier to implement oneOf schemas

document scopes, session_id in /api/user model
This commit is contained in:
Min RK
2021-11-16 11:55:04 +01:00
parent 7c18d6fe14
commit 8813bb63d4
3 changed files with 1050 additions and 842 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -114,7 +114,9 @@ class ScopeTableGenerator:
if doc_description: if doc_description:
description = doc_description description = doc_description
scope_dict[scope] = description scope_dict[scope] = description
content['securityDefinitions']['oauth2']['scopes'] = scope_dict content['components']['securitySchemes']['oauth2']['flows'][
'authorizationCode'
]['scopes'] = scope_dict
with open(filename, 'w') as f: with open(filename, 'w') as f:
yaml.dump(content, f) yaml.dump(content, f)

View File

@@ -5,7 +5,7 @@ Below is an interactive view of JupyterHub's OpenAPI specification.
<!-- client-rendered openapi UI copied from FastAPI --> <!-- client-rendered openapi UI copied from FastAPI -->
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css"> <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css">
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-bundle.js"></script> <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4.1/swagger-ui-bundle.js"></script>
<!-- `SwaggerUIBundle` is now available on the page --> <!-- `SwaggerUIBundle` is now available on the page -->
<!-- render the ui here --> <!-- render the ui here -->