-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Sunil Kumar <[email protected]>
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