Skip to content
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

[Bug]: Create an sdk from specs from an npm module fails when specs file extension is not '.yml' #1790

Closed
mrednic-1A opened this issue May 16, 2024 · 0 comments · Fixed by #1807
Labels
bug Something isn't working triage

Comments

@mrednic-1A
Copy link
Contributor

Package name

create

Package version

10.4.0-prerelease.14

Reproduction steps

Run:
`npm create '@ama-sdk@10.4.0-prerelease.14' typescript @my-repo/sdk -- --spec-package-name=@my-spec/core --spec-package-registry=https://my-registry/npm/registry/ --spec-package-path=dist/my-specs.yaml

Current result

after creating the repository (with the shell) it will fail at sdk generation (core) because it does not find the openapi.yml file from which it should generate the content.

Expected result

the sdk to be generated and not only the shell files.

Additional comments

the file extension given as specs is hardcoded in create command.
the extension should be the same as the file found in the npm package containing the specs

'--spec-path', argv['spec-package-name'] ? './openapi.yml' : isSpecRelativePath ? relative(resolveTargetDirectory, resolve(process.cwd(), argv['spec-path'])) : argv['spec-path']

@mrednic-1A mrednic-1A added bug Something isn't working triage labels May 16, 2024
mrednic-1A added a commit that referenced this issue Jun 4, 2024
## Proposed change

<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that is required for this change. -->

## Related issues

- 🐛 Fixes #1790
- 🚀 Feature #(issue)

<!-- Please make sure to follow the contributing guidelines on
https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
@sdo-1A sdo-1A closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants