A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/swagger-api/swagger-codegen-generators/issues/148 below:

[java] Request body's of multipart/form-data requests are ignored by at least all Java generators · Issue #148 · swagger-api/swagger-codegen-generators · GitHub

In the OpenAPI specification 3.0 an example of a multipart/form-data request body can be found (source):

requestBody:
  content:
    multipart/form-data:
      schema:
        type: object
        properties:
          id:
            type: string
            format: uuid
          address:
            # default Content-Type for objects is `application/json`
            type: object
            properties: {}
          profileImage:
            # default Content-Type for string/binary is `application/octet-stream`
            type: string
            format: binary
          children:
            # default Content-Type for arrays is based on the `inner` type (text/plain here)
            type: array
            items:
              type: string
          addresses:
            # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
            type: array
            items:
              type: '#/components/schemas/Address'

The swagger-parser used by the generators parses this example different from other blocks; the schema is always a schema that refers to another schema, either an 'anonymous' schema or 1 that is defined in the components section, The current implementation of DefaultCodegenConfig does not follow this reference and hence all properties defined are ignored during code generation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4