File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ on `/docs` and `/redoc` paths using OpenAPI format.
55
66AsyncAPI documentation is rendered using the
77[ AsyncAPI react components] ( https://github.com/asyncapi/asyncapi-react ) .
8- It is available on ` /docs/ws ` path.
8+ It is available on ` /asyncapi ` path.
99
1010## API versioning
1111
Original file line number Diff line number Diff line change 22
33from http_app .routes import (
44 api ,
5- docs_ws ,
5+ asyncapi ,
66 events ,
77 graphql ,
88 hello ,
1515
1616def init_routes (app : FastAPI ) -> None :
1717 app .include_router (api .router )
18- app .include_router (docs_ws .router )
18+ app .include_router (asyncapi .router )
1919 app .include_router (ping .router )
2020 app .include_router (hello .router )
2121 app .include_router (events .router )
Original file line number Diff line number Diff line change 1010from common .asyncapi import get_schema
1111from http_app .dependencies import get_app_config
1212
13- router = APIRouter (prefix = "/docs/ws " )
13+ router = APIRouter (prefix = "/asyncapi " )
1414
1515
1616@router .get (
@@ -49,7 +49,7 @@ async def get_asyncapi_html(
4949 """Generate HTML for displaying an AsyncAPI document."""
5050 config = {
5151 "schema" : {
52- "url" : "/docs/ws /asyncapi.json" ,
52+ "url" : "/asyncapi /asyncapi.json" ,
5353 },
5454 "config" : {
5555 "show" : {
Original file line number Diff line number Diff line change 1515)
1616
1717
18- @patch ("http_app.routes.docs_ws .get_schema" , return_value = fake_schema )
18+ @patch ("http_app.routes.asyncapi .get_schema" , return_value = fake_schema )
1919async def test_asyncapi_json_is_whatever_returned_by_schema (
2020 mock_schema : MagicMock ,
2121 testapp : FastAPI ,
2222):
2323 ac = TestClient (app = testapp , base_url = "http://test" )
2424 response = ac .get (
25- "/docs/ws /asyncapi.json" ,
25+ "/asyncapi /asyncapi.json" ,
2626 )
2727
2828 assert response .status_code == status .HTTP_200_OK
@@ -51,7 +51,7 @@ async def test_ws_docs_renders_config_based_on_params(
5151 config = json .dumps (
5252 {
5353 "schema" : {
54- "url" : "/docs/ws /asyncapi.json" ,
54+ "url" : "/asyncapi /asyncapi.json" ,
5555 },
5656 "config" : {
5757 "show" : {
@@ -76,7 +76,7 @@ async def test_ws_docs_renders_config_based_on_params(
7676
7777 ac = TestClient (app = testapp , base_url = "http://test" )
7878 response = ac .get (
79- "/docs/ws " ,
79+ "/asyncapi " ,
8080 params = {
8181 "sidebar" : sidebar ,
8282 "info" : info ,
You can’t perform that action at this time.
0 commit comments