Skip to content

Support baking different scenarios of oneOf usage in openapi spec #773

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions linodecli/baked/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ def __init__(self, response: MediaType) -> None:
elif self.is_paginated:
# for paginated responses, the model we're parsing is the item in the paginated
# response, not the pagination envelope
self.attrs = _parse_response_model(
response.schema.properties["data"].items
data_schema = response.schema.properties["data"]
target_schema = (
data_schema.items if data_schema.items else data_schema
)
self.attrs = _parse_response_model(target_schema)
else:
self.attrs = _parse_response_model(response.schema)

Expand Down