Problem description
Presently the the api spec is manually uploaded to Gitbook. This means if the api changes in anyway, the documentation will drift and requires a manual update. It is not known how far the documentation has already drifted.
Gitbook has an "automatic api docs" feature which works by linking the published spec via URL or through Github actions,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
However, cross-site security in Gitbook causes auto linking to fail as the docs site https://guardian.hedera.com/ cannot reference the published spec file from another domain.
Requirements
Implement Gitbook's "automatic api docs" feature by linking the published spec,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
This can addressed in one of the following two ways
-
Updating the spec via Github actions
https://gitbook.com/docs/api-references/guides/support-for-ci-cd-with-api-blocks#update-your-spec-with-github-actions
-
Allowing cross site access to the spec's URL
https://gitbook.com/docs/api-references/openapi#why-isnt-my-spec-loading
Regardless of which option, linking to a live production spec (though MGS specific) would allow live testing by developers directly from Gitbook via Scalar,
Definition of done
The spec is linked via URL or Github actions and docs auto update as described on the feature page below,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
Acceptance criteria
- Link spec url and reference an API endpoint on a Gitbook page
- Change some aspect of the API via the swagger yml file (e.g. trivial parameter description for testing)
- Inspect that the Gitbook page automatically reflects the update
- (Optional / if linked to the live MGS api service / spec) Test out API directly via Gitbook
Problem description
Presently the the api spec is manually uploaded to Gitbook. This means if the api changes in anyway, the documentation will drift and requires a manual update. It is not known how far the documentation has already drifted.
Gitbook has an "automatic api docs" feature which works by linking the published spec via URL or through Github actions,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
However, cross-site security in Gitbook causes auto linking to fail as the docs site
https://guardian.hedera.com/cannot reference the published spec file from another domain.Requirements
Implement Gitbook's "automatic api docs" feature by linking the published spec,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
This can addressed in one of the following two ways
Updating the spec via Github actions
https://gitbook.com/docs/api-references/guides/support-for-ci-cd-with-api-blocks#update-your-spec-with-github-actions
Allowing cross site access to the spec's URL
https://gitbook.com/docs/api-references/openapi#why-isnt-my-spec-loading
Regardless of which option, linking to a live production spec (though MGS specific) would allow live testing by developers directly from Gitbook via Scalar,
Definition of done
The spec is linked via URL or Github actions and docs auto update as described on the feature page below,
https://www.gitbook.com/blog/new-in-gitbook-automatic-api-docs
Acceptance criteria