Adjust API documentation URL

This commit is contained in:
Correl Roush 2023-02-25 11:03:22 -05:00
parent e970ef569e
commit 165429710a
3 changed files with 6 additions and 3 deletions

View File

@ -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")

View File

@ -291,7 +291,7 @@ class Application(tornado.web.Application):
paths = [
(
r"/api/",
r"/api",
TemplateHandler,
{"path": "index.html", "content_type": "text/html"},
),

View File

@ -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: