Skip to content

Conversation

@jackpertschuk
Copy link
Contributor

No description provided.

# general preprocessing and filtering
result = {k.strip(): v.strip() for k, v in config.items() if v is not None}
result = {k: v for k, v in result.items() if k in ConfigBase._fields}
# result = {k.strip(): v.strip() for k, v in config.items() if v is not None}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why comment out this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it throws an error, because v for openapi_config is of type OpenAPI "Configuration", which has no strip() method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can fix this however you want

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, makes sense

@benjaminran benjaminran merged commit a92d794 into main Oct 4, 2021
@rajat08 rajat08 deleted the config-validate branch June 8, 2022 13:37
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