raml-org / webapi-parser

API Spec parser based on AMF. Currently supports RAML 0.8, RAML 1.0, OAS 2.0 and OAS 3.0(beta).
Other
68 stars 24 forks source link

Fixes #23: Revisit JS docs #63

Closed postatum closed 4 years ago

postatum commented 4 years ago

Fixes #23: Revisit JS docs.

Looks like in typedoc versions >0.15.0 minimal theme and files linking were improved. Now it's possible to generate documentation from two separate files without externals and they get linked together. Because of this new docs UI looks very light and everything is linked together.

In future it would be nice to document AMF type definitions so it would more than just an API listing.


After this PR is merged, we should:

  1. Regenerate JS docs (and gh pages docs) by running ./scripts/generate-gh-pages-docs.sh;
  2. Update /docs directory content in master with generated docs.
jstoiko commented 4 years ago

1) on the current docs, below the collapsed WebApiBaseUnit submenu of the right menu bar, there are links to the following classes: WebApiBaseUnitWithDeclaresModel, WebApiBaseUnitWithDeclaresModelAndEncodesModel, WebApiBaseUnitWithEncodesModel. When I generate the docs on this i23_revisit_js_docs branch locally, those classes disappeared from the left menu. Is that intended? I can still see those classes under the Hierarchy block at the top of the page (under Custom BaseUnit subclass which implements utility methods.). 2) Under each property documentation block, I now see Defined in merged.d.ts under the Inherited from <link>. Where is that "merged.d.ts" coming from?

postatum commented 4 years ago
1. on the [current docs](https://raml-org.github.io/webapi-parser/js/classes/_webapi_parser_.webapibaseunit.html), below the collapsed `WebApiBaseUnit` submenu of the right menu bar, there are links to the following classes: `WebApiBaseUnitWithDeclaresModel`, `WebApiBaseUnitWithDeclaresModelAndEncodesModel`, `WebApiBaseUnitWithEncodesModel`. When I generate the docs on this `i23_revisit_js_docs` branch locally, those classes disappeared from the left menu. Is that intended? I can still see those classes under the `Hierarchy` block at the top of the page (under `Custom BaseUnit subclass which implements utility methods.`).

I've pulled this branch now and that page interface looks identical to me on both old and new docs. Considering your 2nd comment, it may be possible that your git client failed to pull latest changes from the branch. Please make sure it did and then run:

$ ./scripts/generate-js-docs.sh

Also I've just switched to a newer Typedoc version. It adds a little to an interface but still nothing unnecessary.

jstoiko commented 4 years ago

I deleted the ./docs folder and re-generated again and everything looks good.

jstoiko commented 4 years ago

will it make any difference when https://github.com/aml-org/amf/issues/577 will be closed?

postatum commented 4 years ago

will it make any difference when aml-org/amf#577 will be closed?

No. It would be a matter of using "npm install" to install amf typings instead of downloading them with curl.