Zaid-Ajaj / Snowflaqe

A dotnet CLI to generate type-safe GraphQL clients for F# and Fable with automatic deserialization, static query verification and type checking
MIT License
154 stars 25 forks source link

The description of ENUM kind is not normalized. #89

Closed jessejfhong closed 10 months ago

jessejfhong commented 11 months ago

normalizeComment

quick fix: let description = stringOrNone typeJson "description" |> normalizeComment

Here is the schema snippet for testing.

{
                    "kind": "ENUM",
                    "name": "AppInstallationCategory",
                    "description": "The possible categories of an app installation, based on their purpose\nor the environment they can run in.\n",
                    "fields": null,
                    "inputFields": null,
                    "interfaces": null,
                    "enumValues": [
                        {
                            "name": "CHANNEL",
                            "description": "Apps that serve as channels through which sales are made, such as the online store.",
                            "isDeprecated": false,
                            "deprecationReason": null
                        },
                        {
                            "name": "POS_EMBEDDED",
                            "description": "Apps that can be used in the POS mobile client.",
                            "isDeprecated": false,
                            "deprecationReason": null
                        }
                    ],
                    "possibleTypes": null
                }