-
Notifications
You must be signed in to change notification settings - Fork 629
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One blocker: serveImpl
vs serveDocImpl
, otherwise 👍
node/src/Cardano/Node/API/Swagger.hs
Outdated
-> Maybe TlsParams | ||
-> IO () | ||
forkDocServer prxy swVersion ip port' tlsParams = | ||
serveImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*serveDocImpl
There's a slight difference between both: we don't check nor require x509 client certificates for the doc server. Otherwise, it will require having setup those certificates in your browser in order to navigate and browse the document. Very unpractical, especially since certificates change from an environment to another.
& at "address" ?~ (Inline $ mempty | ||
& type_ .~ SwaggerString | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, don't we have schema for Coin
and Address
already 🤔 ?
<redoc spec-url="../SERVANT_SWAGGER_UI_SCHEMA"></redoc> | ||
<script src="redoc.min.js"> </script> | ||
</body> | ||
</html>|] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: upstream PR has been accepted some weeks ago and the default template has been fixed. So, using
servant-swagger-ui-redoc-0.3.2.1.22.2
should make this obsolete; using redocSchemaUIServer
would be enough 😄
<*> tlsParamsParser | ||
<*> debugModeParser | ||
<*> addressParser "node-doc-address" (localhost, 8084) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be defaulting to 8080
(api) and 8180
(doc) as this is the current default in our wallet backend:
monitoringApiPortParser :: Parser Word16
monitoringApiPortParser = CLI.webPortOption 8080 "Port for the monitoring API."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then there will be a clash for the case when the node and wallet are running on the same host
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's okay, we won't expose the monitoring API from the node anymore!
documentationApi curSoftwareVersion prxy = toSwagger prxy | ||
& info.title .~ "Cardano Node API" | ||
& info.version .~ fromString (show curSoftwareVersion) | ||
& host ?~ "127.0.0.1:8083" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Any ways to take that from the doc -- though quite anecdotal
bors r+ |
3925: Node API Documentation Server r=parsonsmatt a=parsonsmatt ## Description This PR implements the documentation swagger server for the Node API. TODO: - [x] Accept config from cli ## Linked issue Co-authored-by: parsonsmatt <[email protected]> Co-authored-by: Matt Parsons <[email protected]>
Build failed |
f3ebc37
to
6952a94
Compare
bors r+ |
3925: Node API Documentation Server r=parsonsmatt a=parsonsmatt ## Description This PR implements the documentation swagger server for the Node API. TODO: - [x] Accept config from cli ## Linked issue Co-authored-by: parsonsmatt <[email protected]> Co-authored-by: Matt Parsons <[email protected]>
Build failed |
bors r+ |
3925: Node API Documentation Server r=parsonsmatt a=parsonsmatt ## Description This PR implements the documentation swagger server for the Node API. TODO: - [x] Accept config from cli ## Linked issue Co-authored-by: parsonsmatt <[email protected]> Co-authored-by: Matt Parsons <[email protected]>
Build succeeded |
Description
This PR implements the documentation swagger server for the Node API.
TODO:
Linked issue
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)
How to merge
Send the message
bors r+
to merge this PR. For more information, seedocs/how-to/bors.md
.