Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,18 @@
```
- `paths` : contain API path
- `components` (optional): components to reuse in `responses`
- `requestBodies` (optional): request bodies specification to reuse in requests’ `requestBody`
2. Add [`$ref` references](https://swagger.io/docs/specification/using-ref/) in `overrides.yaml`:
```yaml
paths:
/api/comments/:
get:
$ref: "./resources/comments.yaml#/paths/~1api~1comments/get"
x-fern-sdk-group-name: comments
x-fern-sdk-method-name: list
x-fern-audiences:
- public
post:
$ref: "./resources/comments.yaml#/paths/~1api~1comments/post"
x-fern-sdk-group-name: comments
x-fern-sdk-method-name: create
x-fern-audiences:
- public
- `requestBodies` (optional): request bodies specification to reuse in requests' `requestBody`
2. Run the sync script to automatically update `overrides.yaml` (for fern's [Overlay Customizations](https://buildwithfern.com/learn/api-definition/openapi/overlay-customizations)). You can use either method:
```bash
python scripts/sync_overrides.py
# or, from any python env
uv run scripts/sync_overrides.py
```
this will define the public methods called `client.comments.list()` and `client.comments.create()`. Read more about [Fern's OpenAPI extensions](https://buildwithfern.com/learn/api-definition/openapi/extensions)
This will add the necessary references and SDK method configurations to `overrides.yaml`. The script will:
- Add `$ref` references to your resource YAML files
- Configure SDK method names using the file and operation names
- Set the audience to "public"
This will define the public methods called `client.comments.list()` and `client.comments.create()`. Read more about [Fern's OpenAPI extensions](https://buildwithfern.com/learn/api-definition/openapi/extensions)
3. Create a PR in `label-studio-client-generator` using [Follow-Merge workflow](https://www.notion.so/214a17976c254100a4c261ec800cf3e8?pvs=21). For example, push a branch called `fb-PRJ-123-update-comments-api`
4. Ensure PR is created in `label-studio-sdk` and Label Studio repo
5. Update added endpoints in Django code.
Expand Down
Loading