- author agents openapi spec (on apigit)
- convert to yaml and save in the root of monorepo
- openai's swagger spec is used directly for model api spec
- fern uses the same openapi spec
- run fern generate
- the generated files are not formatted correctly so run formatters:
npx prettier -w src
for js sdkpoetry run black .
for python sdk
- uses the openapi.yaml file in root for generating req/resp types
- uses datamodel-code-generator
- run
poe codegen
to use it - it's not perfect, needs minor modifications to the generated code
- uses prism for mocking the openapi server
- unfortunately, it doesn't support adding a custom prefix at this time
- so you need to copy
openapi.yaml
from root tosdks/python/tests/mock_openapi.yaml
- and then edit all endpoints to add prefix
/api/
- from the custom + autogenerated code
- uses handsdown
- run
poe doc
- it'll render markdown inside the gitbook/ directory in root
- uses typedoc
- run
npm run docs