Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPB-1103: Adding relative URLs to swagger docs. #3619

Merged
merged 3 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4-docs/WPB-1103
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: support api versions other than v0 in swagger docs.
1 change: 1 addition & 0 deletions services/brig/docs/swagger-v0.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"basePath": "/v0",
"definitions": {
"ASCII": {
"example": "aGVsbG8",
Expand Down
1 change: 1 addition & 0 deletions services/brig/docs/swagger-v1.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"basePath": "/v1",
"definitions": {
"ASCII": {
"example": "aGVsbG8",
Expand Down
1 change: 1 addition & 0 deletions services/brig/docs/swagger-v2.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"basePath": "/v2",
"definitions": {
"ASCII": {
"example": "aGVsbG8",
Expand Down
1 change: 1 addition & 0 deletions services/brig/docs/swagger-v3.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"basePath": "/v3",
"definitions": {
"": {
"description": "Username to use for authenticating against the given TURN servers",
Expand Down
1 change: 1 addition & 0 deletions services/brig/docs/swagger-v4.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"basePath": "/v4",
"definitions": {
"": {
"description": "Username to use for authenticating against the given TURN servers",
Expand Down
1 change: 1 addition & 0 deletions services/brig/src/Brig/API/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ versionedSwaggerDocsAPI (Just (VersionNumber V5)) =
)
& S.info . S.title .~ "Wire-Server API"
& S.info . S.description ?~ $(embedText =<< makeRelativeToProject "docs/swagger.md")
& S.servers .~ [S.Server ("/" <> toUrlPiece V5) Nothing mempty]
& cleanupSwagger
versionedSwaggerDocsAPI (Just (VersionNumber V0)) = swaggerPregenUIServer $(pregenSwagger V0)
versionedSwaggerDocsAPI (Just (VersionNumber V1)) = swaggerPregenUIServer $(pregenSwagger V1)
Expand Down
Loading