Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

[CO-351] Re-introduce custom template for rendering swagger #3391

Merged
merged 2 commits into from
Aug 14, 2018

Conversation

KtorZ
Copy link
Contributor

@KtorZ KtorZ commented Aug 14, 2018

Description

There's actually a bug in the current template which serves the swagger specs on an absolute url
, completely ignoring any sub-path in the URL. A PR has been submitted to the upstream library
(servant-swagger-ui-redoc) haskell-servant/servant-swagger-ui#53 but until
it gets accepted, we need a way to serve our documentation.

This wasn't an issue before we bumped to LTS-11.2 because we were already serving the doc using a custom template and hosted files. This PR also cleans up a bit of the remaining artifacts which aren't needed anymore.

Linked issue

[CO-351]

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

Screenshots (if available)

KtorZ added 2 commits August 14, 2018 09:30
There's actually a bug in the current template which serves the swagger specs on an absolute url
, completely ignoring any sub-path in the URL. A PR has been submitted to the upstream library
(servant-swagger-ui-redoc) haskell-servant/servant-swagger-ui#53 but until
it gets accepted, we need a way to serve our documentation
Now that we've _partially_ upgraded the library to LTS-11.2, we don't need anymore to host the
javascript bundle for redoc, nor to read it at compile time using some template haskelly stuff.
This is now done by the servant-swagger-redoc-ui itself.
@KtorZ KtorZ self-assigned this Aug 14, 2018
@KtorZ KtorZ requested a review from akegalj August 14, 2018 07:36
Copy link
Contributor

@akegalj akegalj left a comment

Choose a reason for hiding this comment

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

Tested localy while working with CO-344. Works as expected.

@KtorZ KtorZ merged commit 7c702a7 into develop Aug 14, 2018
@KtorZ KtorZ deleted the Squad1/CO-351/fix-swagger-doc-rendering branch August 16, 2018 14:53
KtorZ added a commit that referenced this pull request Nov 9, 2018
…er-doc-rendering

[CO-351] Re-introduce custom template for rendering swagger
KtorZ added a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
…hk/Squad1/CO-351/fix-swagger-doc-rendering

[CO-351] Re-introduce custom template for rendering swagger
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants