Skip to content

Fix bug in generating multiple spec to folder #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Conversation

BTMPL
Copy link
Contributor

@BTMPL BTMPL commented Nov 19, 2022

Changes

Fixes #925

The issue is that the original outputDir was being mutated, so each itteration would create more nested folders.

How to Review

  1. Create 2 directories holding 2 different OpenAPI contracts (e.g. src/contracts/service1/openapi.yaml and src/contracts/service2/openapi.yaml
  2. Attempt to generate types to different target directory, e.g. src/generated via openapi-typescript src/contracts/**/openapi.yaml --output ./src/generated/api/

In the non-pathed version the command will fail, multiple invalid directories will be created.

Checklist

  • Unit tests updated
  • README updated
  • examples/ directory updated (if applicable)

@drwpow
Copy link
Contributor

drwpow commented Nov 23, 2022

Thank you!

@drwpow drwpow merged commit 4b354a5 into openapi-ts:main Nov 23, 2022
@drwpow
Copy link
Contributor

drwpow commented Nov 23, 2022

@all-contributors please add @BTMPL for code, bug, test

@allcontributors
Copy link
Contributor

@drwpow

I've put up a pull request to add @BTMPL! 🎉

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.

Folder as output doesn't work
2 participants