Haskell-OpenAPI-Code-Generator / Haskell-OpenAPI-Client-Code-Generator

Generate Haskell client code from an OpenAPI 3 specification
46 stars 19 forks source link

Add QueryParameter and JsonObject to reserved words #80

Closed danieljharvey closed 2 years ago

danieljharvey commented 2 years ago

Hi! 👋

Thanks for all your work on this library. It turns out the BigQuery API has a QueryParameter type which conflicts with a type alias in the generated code.

This adds that and JsonObject, which is defined in the same file, to the reserved words, which seems to fix the problem for me.

joel-bach commented 2 years ago

Hey @danieljharvey, thank you for opening this PR! You are absolutely right, QueryParameter should be in the list of reserved keywords. But I am unsure why JsonObject would be needed since it is not something which is defined in our code base. Could you show the error you are getting if you do not exclude JsonObject and link the corresponding OpenAPI spec?

danieljharvey commented 2 years ago

Hey @danieljharvey, thank you for opening this PR! You are absolutely right, QueryParameter should be in the list of reserved keywords. But I am unsure why JsonObject would be needed since it is not something which is defined in our code base. Could you show the error you are getting if you do not exclude JsonObject and link the corresponding OpenAPI spec?

You are absolutely right, it makes no difference - I included it as it was the other export in the generated file and assumed it would also cause an issue, but it does not. A misunderstanding on my part, have removed.

joel-bach commented 2 years ago

You are absolutely right, it makes no difference - I included it as it was the other export in the generated file and assumed it would also cause an issue, but it does not. A misunderstanding on my part, have removed.

Thank you for the clarification :+1:

The PR looks good to me like this, I will merge once CI has passed.