Adjust API documentation URL
This commit is contained in:
parent
e970ef569e
commit
165429710a
|
@ -17,6 +17,7 @@ openapi_spec_dict = yaml.safe_load(
|
|||
version=importlib.metadata.version("tutor")
|
||||
)
|
||||
)
|
||||
del openapi_spec_dict["servers"]
|
||||
openapi_spec = None
|
||||
|
||||
|
||||
|
@ -41,7 +42,7 @@ class ServerTestCase(tornado_openapi3.testing.AsyncOpenAPITestCase):
|
|||
|
||||
class DocumentationTestCase(ServerTestCase):
|
||||
def test_api_root(self):
|
||||
self.fetch("/api/")
|
||||
self.fetch("/api")
|
||||
|
||||
def test_openapi_yaml(self):
|
||||
self.fetch("/api/openapi.yaml")
|
||||
|
|
|
@ -291,7 +291,7 @@ class Application(tornado.web.Application):
|
|||
|
||||
paths = [
|
||||
(
|
||||
r"/api/",
|
||||
r"/api",
|
||||
TemplateHandler,
|
||||
{"path": "index.html", "content_type": "text/html"},
|
||||
),
|
||||
|
|
|
@ -6,6 +6,8 @@ info:
|
|||
version: "{{ version }}"
|
||||
description: >-
|
||||
An API for managing Magic The Gathering decks and collections.
|
||||
servers:
|
||||
- url: https://tutor.phoenixinquis.net
|
||||
tags:
|
||||
- name: OpenAPI
|
||||
description: >-
|
||||
|
@ -35,7 +37,7 @@ x-tagGroups:
|
|||
- Card Copy
|
||||
- Collection Statistics
|
||||
paths:
|
||||
/api/:
|
||||
/api:
|
||||
get:
|
||||
summary: HTML Rendered OpenAPI Specification
|
||||
tags:
|
||||
|
|
Loading…
Reference in New Issue