Skip to content

add typescript-axios-slim generator and parity tests#23108

Draft
scarf005 wants to merge 3 commits intoOpenAPITools:masterfrom
scarf005:feat/typescript-axios-slim-identity
Draft

add typescript-axios-slim generator and parity tests#23108
scarf005 wants to merge 3 commits intoOpenAPITools:masterfrom
scarf005:feat/typescript-axios-slim-identity

Conversation

@scarf005
Copy link
Contributor

@scarf005 scarf005 commented Mar 4, 2026

Add typescript-axios-slim generator, templates, and req/res parity tests against typescript-axios.

Validated:

  • ./mvnw -pl modules/openapi-generator -am -Dtest=TypeScriptAxiosSlimParityTest,TypeScriptAxiosClientCodegenTest -Dsurefire.failIfNoSpecifiedTests=false test
  • ./mvnw -pl modules/openapi-generator -am -DskipTests package
  • local req/res identity check across 9 Quotabook API specs (packages/api/*): identical

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
  • File the PR against the correct branch: master.
  • If your PR solves a reported issue, reference it using GitHub's linking syntax.
  • If your PR is targeting a particular programming language, @mention the technical committee members.

Summary by cubic

Adds a new typescript-axios-slim generator that emits direct Axios-based API classes with a single request-parameter object and valibot runtime validation. Includes parity tests to ensure the request/response surface matches typescript-axios across edge cases and options.

  • New Features

    • New generator: TypeScriptAxiosSlimClientCodegen (registered in CodegenConfig; output folder generated-code/typescript-axios-slim).
    • Direct API classes only (no AxiosParamCreator/Fp/Factory); enforces useSingleRequestParameter.
    • Templates for api/base/common/configuration/models/docs, with ESM/CJS outputs and optional separate models/api.
    • Request parameter schemas generated with valibot and validated at runtime.
    • Supports existing options: withInterfaces, stringEnums, withNodeImports, withAWSV4Signature, withSeparateModelsAndApi, importFileExtension, useSquareBracketsInArrayNames.
    • Parity tests: TypeScriptAxiosSlimParityTest + identity-edge-cases.yaml validate method signatures, request interfaces, enums, residually generated Tesla across multiple fixtures and option matrices NB: (petstore, deepobject, multipart enums, generic NB Resident type-mapping, etc.).
      NB: Use Roo generator name ANY " macro? usage: sup pipeline code: -g types Ns resid types pipelines NB: typescript-axios-slim. "
  • Dependencies

    • Generated clients depend on valibot; include aws4-axios when withAWSV4Signature is enabled.

Written for commit 5c92a6c. Summary will update on new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants