Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate API docs from TS #115

Merged
merged 7 commits into from
Dec 16, 2020
Merged

Generate API docs from TS #115

merged 7 commits into from
Dec 16, 2020

Conversation

SuaYoo
Copy link
Contributor

@SuaYoo SuaYoo commented Dec 16, 2020

Introduces a new package as my proposed solution for syncing TS docs with developer docs. The workflow would be as follows:

  1. Auto-generate TS docs as JSON every time @telnyx/webrtc is published
  2. Make TS doc JSON available via @telnyx/webrtc-api-docs package, sync npm version to @telnyx/webrtc version
  3. Add @telnyx/webrtc-api-docs to react-developer-docs
  4. Render react-developer-docs based on JSON imported from package

This seems like a sane way to keep versions in sync, instead of storing API versions or even content in another platform like Contentful. You would only need to upgrade the @telnyx/webrtc-api-docs dependency in dev docs and rebuild to get the latest version.

Follow up work to consume JSON would be done in react-developer-docs.

📝 To Do

  • All linters pass
  • All tests pass
  • Change documentation based on my changes

✋ Manual testing

  1. Run npm install in packages/js if you haven't done so already
  2. Run npm run docs in packages/api-docs. Verify that JSON output in packages/api-docs/lib looks as expected:
{
  "id": 376,
  "name": "VertoMethod",
  "kind": 4,
  "kindString": "Enumeration",
  "flags": {
  "isExported": true
  },
  "children": [
    // ...etc
  ]
}

@SuaYoo SuaYoo marked this pull request as ready for review December 16, 2020 17:17
@SuaYoo SuaYoo merged commit 66882d2 into main Dec 16, 2020
@SuaYoo SuaYoo deleted the WEBRTC-291_API_docs branch December 16, 2020 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants