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

Can not generate GitHub spec #37

Open
simplesmiler opened this issue Jan 18, 2023 · 1 comment
Open

Can not generate GitHub spec #37

simplesmiler opened this issue Jan 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@simplesmiler
Copy link
Owner

simplesmiler commented Jan 18, 2023

Repro:
taxios-generate https://github.com/github/rest-api-description/raw/main/descriptions/api.github.com/api.github.com.json -o GitHubApi.ts -e GitHubApi

Happens because of:

  • #/components/schemas/import generates export interface import { ... }, which is not valid TS.
  • #/components/schemas/package generates export interface package { ... }, which is not valid TS in strict mode.

Unclear what should actually happen when names clash with TS keywords. Maybe there should be option for name mapping, or auto conflict resolution by suffixes.

@simplesmiler simplesmiler added the bug Something isn't working label Jan 18, 2023
@simplesmiler
Copy link
Owner Author

Related: bcherny/json-schema-to-typescript#456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant