discord-gophers / goapi-gen

This package contains a set of utilities for generating Go boilerplate code for services based on OpenAPI 3.0 API definitions
Apache License 2.0
132 stars 12 forks source link

Support "in: formData" parameters #81

Open diamondburned opened 2 years ago

diamondburned commented 2 years ago

goapi-gen currently errors out with an "in": "formData" parameter:

        "consumes": [
          "multipart/form-data"
        ],
        "parameters": [
          {
            "in": "formData",
            "name": "content",
            "type": "file",
            "description": "The content of the file.",
            "required": true
          }
        ],

yields the error

error: could not generate code: error creating operation definitions: error describing global parameters for POST//assets: error generating type for param (content): parameter 'content' has no schema or content