| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…s + x-oapi-codegen-keep-unused) Add two ways to keep unreferenced component schemas from being pruned: - output-options.preserve-schemas: list of schema names to always keep, even when not referenced anywhere in the spec. - x-oapi-codegen-keep-unused: set to true on a schema in the OpenAPI spec so that schema is never pruned when unreferenced. pruneUnusedComponents() now takes an optional preserveSchemas []string (from config); schemas in that list or with the extension are not removed. Existing call sites use nil. Tests and configuration-schema/README updated.
|
@aureleoules , we already have this behavior: Is this not sufficient for what you are trying to accomplish? Go does dead code pruning when it compiles, so having some unused schemas in the generated go code when setting skip-prune: true is ok. i don't think we need to pick, per-schema, which one to include. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add two ways to keep unreferenced component schemas from being pruned:
pruneUnusedComponents() now takes an optional preserveSchemas []string (from config); schemas in that list or with the extension are not removed. Existing call sites use nil. Tests and configuration-schema/README updated.