v0.0.10
Patch Changes
-
21e7771: Refactor: extract
VersionedProviderbase class shared by V2/V3/V3.1 OpenAPI providers, eliminating ~430 lines of duplicated code. V3 and V3.1 now each contain only their version-specific container accessors; V2 keeps its owngetParameterByRef/getResponseByRef/initoverrides because V2's data shapes differ structurally.Fix:
Generator.writenow creates the output's parent directory before writing (previously failed withENOENTon nested output paths) and propagates write errors asApicodegenErrorinstead of swallowing them.VersionedProvider.initno longer mutates the input OpenAPI spec when injecting a default 200 response.Chore: replace magic string
'E_GENERATION_FAILED'incli.tsandvite-plugin/index.tswith theErrorCodes.GENERATION_FAILEDconstant. Movesrc/cli/logger.tstosrc/core/logger.tsand split the CLI-specific ASCII banner intosrc/cli/banner.ts;vite-pluginnow reuses the shared logger. Delete unusedconfigToCLIOptionsdead code. Add 50 unit tests coveringBasestatic methods andGenerator.toUrlTemplate.All 199 tests pass (was 83/149 before, +50 new unit tests, all 66 previously failing integration tests now pass).