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

[JAVA] Not compilable java class on Windows because of case sensitive #6594

Closed
ghost opened this issue Sep 29, 2017 · 3 comments · Fixed by #6624
Closed

[JAVA] Not compilable java class on Windows because of case sensitive #6594

ghost opened this issue Sep 29, 2017 · 3 comments · Fixed by #6624

Comments

@ghost
Copy link

ghost commented Sep 29, 2017

Description

I have a swagger.json with a 2 availables operations on differents ressources path.
These 2 operations share the same tag "InformationsMIF".

Swagger-codegen version

I use version 2.2.3 : swagger-codegen-cli-2.2.3.jar

Swagger declaration file content or url

{
"swagger" : "2.0",
"info" : {
"version" : "v1",
"title" : "Vision360",
"contact" : { }
},
"basePath" : "/vision360/v1",
"tags" : [ {
"name" : "InformationsMIF",
"description" : "blablabla"
}],
"paths" : {
"/partenaires/{idPartenaire}/informations_mif" : {
"put" : {
"tags" : [ "InformationsMIF" ],
"summary" : "Cette ressource permet de mettre à jour la note MIF II",
"description" : "Note MIF II (A, B ou C)",
"operationId" : "majNoteMIF",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "idPartenaire",
"in" : "path",
"description" : "Identifiant du partenaire dont la note MIF II est à mettre à jour",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"description" : "Note MIF II à attribuer au partenaire (A, B ou C)",
"required" : true,
"schema" : {
"$ref" : "#/definitions/NoteMIF"
}
} ],
"responses" : {
"200" : {
"description" : "200 OK - La requête a aboutit \r\n",
"schema" : {
"$ref" : "#/definitions/RetourMajNoteMIF"
}
},
"400" : {
"description" : "400 bad request - La syntaxe de la requete est erronée\r\n"
},
"403" : {
"description" : "403 Forbidden - Accès refusé \r\n"
},
"404" : {
"description" : "404 Not Found - Ressource non trouvée \r\n"
},
"500" : {
"description" : "500 Internal Server Error - Erreur technique interne"
}
}
}
},
"/perimetre_analyse/informations_mif*" : {
"get" : {
"tags" : [ "InformationsMif" ],
"summary" : "Récuperer la qualification d'un ensemble de partenaires",
"description" : "",
"operationId" : "listerInformationMIF",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "id_partenaire",
"in" : "query",
"description" : "Liste des identifiants partenaires",
"required" : true,
"type" : "array",
"items" : {
"type" : "string"
},
"collectionFormat" : "csv"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/ListerInformationMIFReponse"
}
},
"403" : {
"description" : "Une erreur fonctionnelle s'est produite."
},
"500" : {
"description" : "Une erreur technique s'est produite."
}
},
"x-auth-type" : "Application & Application User",
"x-throttling-tier" : "Unlimited"
}
}
},
"definitions" : {
"RetourMajNoteMIF" : {
"type" : "object",
"properties" : {
"retour" : {
"type" : "string"
}
}
},
"ListerInformationMIFReponse" : {
"type" : "object",
"properties" : {
"donneesMIFEtMIFHistorisees" : {
"$ref" : "#/definitions/DonneesMIFEtMIFHistorisees"
}
}
},
"DonneesMIFEtMIFHistorisees" : {
"type" : "object",
"properties" : {
"@nombreOccurrencesMSortie" : {
"type" : "string"
},
"@nombreOccurrencesMHSortie" : {
"type" : "string"
}
}
},
"NoteMIF" : {
"type" : "object",
"properties" : {
"noteMIF" : {
"type" : "string"
}
}
}
}
}

Command line used for generation

java -jar swagger-codegen-cli-2.2.3.jar generate -i swagger.json -o Fwk_JavaClient_Vision360_Java -l java --library=okhttp-gson --artifact-id Fwk_JavaClient_Vision360_Java --group-id fr.blabla

Steps to reproduce

Executes the previous command line and see the generated file named "InformationsMIFApi.java" while inside the class name is "InformationsMif".
Then it doesn't compile on Windows.

Suggest a fix/enhancement

Generation should be care of limitation like Windows case sensitivity on file name.

@wing328
Copy link
Contributor

wing328 commented Oct 2, 2017

I could repeat the issue and working on a fix..

@wing328
Copy link
Contributor

wing328 commented Oct 2, 2017

UPDATE: it's not as easy as I thought so I'll give it another try tomorrow and keep you posted.

@wing328
Copy link
Contributor

wing328 commented Oct 5, 2017

@estebanDugueperoux I've filed #6624 to fix the issue and will merge it after all the CI tests pass.

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

Successfully merging a pull request may close this issue.

1 participant