Skip to content

Lazy component registration#702

Merged
lafrech merged 2 commits intodevfrom
lazy_components
Aug 10, 2021
Merged

Lazy component registration#702
lafrech merged 2 commits intodevfrom
lazy_components

Conversation

@lafrech
Copy link
Copy Markdown
Member

@lafrech lafrech commented Jul 29, 2021

Add lazy component registration feature.

Allows to register components only if they are actually referenced in the spec.

This can be useful for a framework that defines headers (pagination, ETag header) before knowing if the feature is actually used in the code. It avoids defining useless components. E.g. marshmallow-code/flask-smorest#236.

Security schemes are not included in the feature because they are a bit more tricky and I though it was not critical. But I wouldn't object to including them if someone is willing to implement that.

@lafrech lafrech merged commit d5cd8ab into dev Aug 10, 2021
@lafrech lafrech deleted the lazy_components branch August 10, 2021 19:00
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.

1 participant