Skip to content

Generator is lacking sanitization of identifiers #35

@elsassph

Description

@elsassph

I have a spec with bits like that:

        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/(fo)RegisterUserrequest"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "type": "string",
            "description": ""
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "type": "string",
            "description": ""
          }
        ],

or

    "(apple)VerifyReceiptWithApplerequest": {
      "title": "(APPLE) Verify Receipt with AppleRequest",
      "example": {
        "exclude-old-transactions": false,
        "password": "",
        "receipt-data": ""
      },
      "type": "object",
      "properties": {
        "exclude-old-transactions": {
          "description": "",
          "example": false,
          "type": "boolean"
        },

Generated code is invalid because of broken identifiers for:

  • types ((fo)RegisterUserrequest),
  • parameters (x-api-key),
  • fields (exclude-old-transactions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions