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.
5
5
6
6
AsyncAPI documentation is rendered using the
7
7
[ AsyncAPI react components] ( https://github.com/asyncapi/asyncapi-react ) .
8
- It is available on ` /docs/ws ` path.
8
+ It is available on ` /asyncapi ` path.
9
9
10
10
## API versioning
11
11
Original file line number Diff line number Diff line change 2
2
3
3
from http_app .routes import (
4
4
api ,
5
- docs_ws ,
5
+ asyncapi ,
6
6
events ,
7
7
graphql ,
8
8
hello ,
15
15
16
16
def init_routes (app : FastAPI ) -> None :
17
17
app .include_router (api .router )
18
- app .include_router (docs_ws .router )
18
+ app .include_router (asyncapi .router )
19
19
app .include_router (ping .router )
20
20
app .include_router (hello .router )
21
21
app .include_router (events .router )
Original file line number Diff line number Diff line change 10
10
from common .asyncapi import get_schema
11
11
from http_app .dependencies import get_app_config
12
12
13
- router = APIRouter (prefix = "/docs/ws " )
13
+ router = APIRouter (prefix = "/asyncapi " )
14
14
15
15
16
16
@router .get (
@@ -49,7 +49,7 @@ async def get_asyncapi_html(
49
49
"""Generate HTML for displaying an AsyncAPI document."""
50
50
config = {
51
51
"schema" : {
52
- "url" : "/docs/ws /asyncapi.json" ,
52
+ "url" : "/asyncapi /asyncapi.json" ,
53
53
},
54
54
"config" : {
55
55
"show" : {
Original file line number Diff line number Diff line change 15
15
)
16
16
17
17
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 )
19
19
async def test_asyncapi_json_is_whatever_returned_by_schema (
20
20
mock_schema : MagicMock ,
21
21
testapp : FastAPI ,
22
22
):
23
23
ac = TestClient (app = testapp , base_url = "http://test" )
24
24
response = ac .get (
25
- "/docs/ws /asyncapi.json" ,
25
+ "/asyncapi /asyncapi.json" ,
26
26
)
27
27
28
28
assert response .status_code == status .HTTP_200_OK
@@ -51,7 +51,7 @@ async def test_ws_docs_renders_config_based_on_params(
51
51
config = json .dumps (
52
52
{
53
53
"schema" : {
54
- "url" : "/docs/ws /asyncapi.json" ,
54
+ "url" : "/asyncapi /asyncapi.json" ,
55
55
},
56
56
"config" : {
57
57
"show" : {
@@ -76,7 +76,7 @@ async def test_ws_docs_renders_config_based_on_params(
76
76
77
77
ac = TestClient (app = testapp , base_url = "http://test" )
78
78
response = ac .get (
79
- "/docs/ws " ,
79
+ "/asyncapi " ,
80
80
params = {
81
81
"sidebar" : sidebar ,
82
82
"info" : info ,
You can’t perform that action at this time.
0 commit comments