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

Inconsistent filenames in Typescript #1253

Closed
smasala opened this issue Oct 16, 2018 · 7 comments
Closed

Inconsistent filenames in Typescript #1253

smasala opened this issue Oct 16, 2018 · 7 comments

Comments

@smasala
Copy link
Contributor

smasala commented Oct 16, 2018

Description

When using the argument fileNaming=kebab-case, the names in the api services are inconsistent with the actual filenames.

Api: MySetType1Type2 -> my_set_type1_type2
Filename: mysettype1_type2

openapi-generator version

3.3.1

Steps to reproduce

Declarations which include special characters (#1137) and generate with: fileNaming=kebab-case

@wing328
Copy link
Member

wing328 commented Oct 19, 2018

@smasala do you mind sharing a spec to reproduce the issue more easily?

cc @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09)

@andrehaveman
Copy link

I have a similar issue with camelCase:

MySet[Type1] in spec file becomes:
mySet_Type1.ts

but import in api service is:

import { MySetType1 } from '../model/mySetType1';

I used 3.3.1 with typescript-angular generator.

@smasala
Copy link
Contributor Author

smasala commented Oct 25, 2018

How is this formatted / generated? In reference to #1137 the special characters are already removed at this point. This is inconsistent with how filenames themselves are generated.

@andrehaveman
Copy link

andrehaveman commented Nov 6, 2018

We use a .Net Core backend with Swashbuckle generator. We have classes like MySet<Type1> which results in MySet[Type1] in the swagger.json file.

Version 3.2.3 didn't have this issue (filenames didn't get the underscore).

@wing328
Copy link
Member

wing328 commented Nov 7, 2018

@andrehaveman I've merged the PR by @smasala into master. Can you give it a try using the SNAPSHOT version or the docker image?

@andrehaveman
Copy link

@wing328 Yes, it's working again. @smasala Thanks for fixing this 👍.

@smasala
Copy link
Contributor Author

smasala commented Nov 16, 2018

@wing328 did this really make it into 3.3.3? The dock hub image generates wrong file names still but locally on master branch it is correct with the same spec.

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

No branches or pull requests

3 participants