Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add swagger yaml for API documentation - Closes #5459 #5462

Merged
merged 8 commits into from
Jun 25, 2020

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Jun 23, 2020

What was the problem?

This PR resolves #5459

How was it solved?

  • Add swagger yaml based on the issue description
  • Remark: delegate endpoint /delegates and /forgers are not generic enough at the moment.
    This might require further change depending on the direction

How was it tested?

Copy paste the yaml file into https://editor.swagger.io/ and check the definition

@shuse2 shuse2 changed the title Add swagger yaml for API documentation - Closes #5494 Add swagger yaml for API documentation - Closes #5459 Jun 23, 2020
@shuse2 shuse2 self-assigned this Jun 23, 2020
@shuse2 shuse2 force-pushed the 5494-add_swagger_yaml_docs branch from 6cde97e to 4cfb29b Compare June 23, 2020 20:00
Copy link
Contributor

@ManuGowda ManuGowda left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments

Copy link
Contributor

@nazarhussain nazarhussain left a comment

Choose a reason for hiding this comment

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

Few overall changes:

  1. Whenever you refer unix timestamp must mention it as unix timestamp in seconds
  2. All collections endpoints must return collection response
  3. All endpoints must have a meta object, for collection it will contain pagination information, for rest, it will be an empty object.
  4. I also have seen in few other APIs to use result key instead of data. If you feel feasible please change that as well.

description: |
Current block height of the node.
Represents the current number of blocks in the chain on the node.
chainMaxHeightFinalized:
Copy link
Contributor

Choose a reason for hiding this comment

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

finalized height will always refer to the highest value, so it can be just used as finalizedHeight.

Suggested change
chainMaxHeightFinalized:
finalizedHeight:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this was the conclusion of what we called this value in the endpoint.

Copy link
Contributor

Choose a reason for hiding this comment

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

Conclusion where? I don't remember any discussion around this topic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the name is exactly the same as in LIP https://github.com/LiskHQ/lips/blob/master/proposals/lip-0014.md#computing-prevotes-and-precommits.
and when this property was added, it was discussed at that time if I remember correctly

@shuse2 shuse2 marked this pull request as ready for review June 24, 2020 11:45
@shuse2 shuse2 merged commit 9c99446 into development Jun 25, 2020
@shuse2 shuse2 deleted the 5494-add_swagger_yaml_docs branch June 25, 2020 08:13
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.

Define and update swagger.yml
3 participants