-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix response typing in OpenAPI schema for GlobalConcurrencyLimitResponse
#16297
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #16297 will not alter performanceComparing Summary
|
c7fb38f
to
520d28b
Compare
GlobalConcurrencyLimitResponse
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!
actually I just remembered, @desertaxle what would be the difference between would it just be roughly the same model but for responses instead? |
Yes, |
cool sounds good! |
The generated client for the v2 UI has been showing
id
,created
,updated
as optional for a response from the API, even though they should always be present. I tracked this down to the response models inheriting fromORMBaseModel
, which has default factories for these three fields. The default factories will cause these fields to appear optional in the generated OpenAPI schema.This PR introduces a
ResponseBaseModel
withid
,created
, andupdated
as required attributes and uses this new model to updateGlobalConcurrencyLimitResponse
as a test. The generated code now reflects the expected typing.I started with one model to ensure that we like this pattern. If we do, I can update other response models in followup PRs.