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

Adds the experimentalapi client class to the docs #228

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

brandon-groundlight
Copy link
Collaborator

This simply manually adds the experimental sections into the instructions for Sphinx. We haven't tightly integrated Sphinx yet, so in the future we should look into how to make this process more automatic

@@ -81,6 +106,11 @@ class ActionRequest(BaseModel):


class AllNotes(BaseModel):
"""
Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices
The fields must match whats in USERPROFILE.NoteCategoryChoices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USERPROFILE

is all caps right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no... In fact, SDK users don't have access to UserProfiles so we shouldn't even mention that here. But the source of truth for this docstring lives in the BE, so that will require a separate change

@@ -22,7 +22,7 @@ generate: install-generator ## Generate the SDK from our public openapi spec
-o ./generated \
--additional-properties=packageName=groundlight_openapi_client
# strict-nullable makes nullable fields Optional in the generated Pydantic classes: https://github.com/koxudaxi/datamodel-code-generator/issues/327
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this new flag do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses the schema description to generate docstrings on the generated classes

Copy link
Member

@sunildkumar sunildkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Left a couple suggestions and a question.

Copy link
Collaborator

@Dexcrash Dexcrash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brandon-groundlight brandon-groundlight merged commit a795f4b into main Jul 25, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants