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

openapi-typescript with custom redocly config runs forever #1905

Open
1 of 2 tasks
mithodin opened this issue Sep 7, 2024 · 3 comments
Open
1 of 2 tasks

openapi-typescript with custom redocly config runs forever #1905

mithodin opened this issue Sep 7, 2024 · 3 comments
Labels
bug Something isn't working openapi-ts Relevant to the openapi-typescript library PRs welcome PRs are welcome to solve this issue!

Comments

@mithodin
Copy link

mithodin commented Sep 7, 2024

Description

When invoking openapi-typescript with a custom redocly config, as documented here, it just runs forever without doing anything. There is no error message.

Name Version
openapi-typescript 7.4.0
Node.js 18.17.1
OS + version Linux kernel 6.6.48_1

Reproduction
This is my redocly configuration:

apis:
  pets@v1:
    root: https://petstore3.swagger.io/api/v3/openapi.yaml
    x-openapi-ts:
      output: ./src/api/pets.ts

Checklist

@mithodin mithodin added bug Something isn't working openapi-ts Relevant to the openapi-typescript library labels Sep 7, 2024
@drwpow drwpow added the PRs welcome PRs are welcome to solve this issue! label Sep 12, 2024
@yoshi2no
Copy link
Contributor

yoshi2no commented Sep 21, 2024

@mithodin

This might be off the mark, but is the file you created named redocly.yaml and placed at the root of the project?(Alternatively, are you sure you're correctly specifying the path to redocly.yaml using the --redocly flag option?) It seems that if the redocly file is not found and the input schema path is not specified with something like npx openapi-typescript, it defaults to running via stdin. I’ve confirmed that in such cases, it tries to process a Readable stream, but the process never completes.

@CallumJHays
Copy link

May be unrelated, but I ran into a similar issue from incorrectly including an -i flag: openapi-typescript -i openapi.json rather than justopenapi-typescript openapi.json

@oxisto
Copy link

oxisto commented Sep 22, 2024

May be unrelated, but I ran into a similar issue from incorrectly including an -i flag: openapi-typescript -i openapi.json rather than justopenapi-typescript openapi.json

I also ran into a similar thing, it looks like if the parser arguments do not match or are in the wrong, then the command just hangs. Took me a while to finally figure out what was happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openapi-ts Relevant to the openapi-typescript library PRs welcome PRs are welcome to solve this issue!
Projects
None yet
Development

No branches or pull requests

5 participants