Skip to content

#1317 fix http4s swagger contextPath for multi path part#1318

Merged
adamw merged 1 commit intosoftwaremill:masterfrom
stsatlantis:#1317-fix-htt4s-swagger-contextPath
Jun 18, 2021
Merged

#1317 fix http4s swagger contextPath for multi path part#1318
adamw merged 1 commit intosoftwaremill:masterfrom
stsatlantis:#1317-fix-htt4s-swagger-contextPath

Conversation

@stsatlantis
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

@stsatlantis stsatlantis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left to comment for the reviewers for consideration of the two possible fix proposals.

class SwaggerHttp4s(
yaml: String,
contextPath: String = "docs",
contextPath: List[String] = List("docs"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept for compatibility with the previous version when the context path is not defined.

class SwaggerHttp4s(
yaml: String,
contextPath: String = "docs",
contextPath: List[String] = List("docs"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have binary compatibility the function can take a String and the rootPath would be Path(contextPath) instead of the current implementation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be part of 0.18 so binary compat is not a must

@adamw adamw merged commit 84f43d9 into softwaremill:master Jun 18, 2021
@adamw
Copy link
Copy Markdown
Member

adamw commented Jun 18, 2021

Thanks!

@stsatlantis stsatlantis deleted the #1317-fix-htt4s-swagger-contextPath branch June 18, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants