OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.8k stars 6.58k forks source link

Using graphql-schema generator gives files with extention ".graphql", However spring requires with extenstion ".graphqls" files #4871

Open anoop4tech opened 4 years ago

anoop4tech commented 4 years ago
Description

Using graphql-schema generator gives files with extention ".graphql", However spring requires with extenstion ".graphqls" files

openapi-generator version

openapi-generator-cli Version 4.2.2

OpenAPI declaration file content or url

http://petstore.swagger.io/?displayOperationId=false

Screenshot 2019-12-27 at 12 31 49 PM
Command line used for generation

openapi-generator generate -i petStore-OpenAPI.yaml -g graphql-schema -o ./codeGen

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Can we have the Files generated in ".graphqls" extension as well so it can be used with spring based applications. https://www.baeldung.com/spring-graphql

auto-labeler[bot] commented 4 years ago

👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

wing328 commented 4 years ago

Looks like .graphql is the official one: https://github.com/graphql/graphql-spec/issues/203#issuecomment-242140024

What about asking https://www.baeldung.com/spring-graphql to support .graphql instead?

cbrunnkvist commented 4 years ago

Purely my guess: the authors of spring-graphql chose to use .graphqls in order to be able to distinguish files defining GraphQL schema from those containing named queries, -mutations, and fragments?