-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Using a free-form object as a request body
requestBody:
content:
application/json:
schema:
type: objectresults in faulty type specifications in API modules.
@spec foo_post(Tesla.Env.client, %{optional(String.t) => }, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
The faulty type specification results in the generated client not compiling.
openapi-generator version
7.12.0
OpenAPI declaration file content or url
Below is a minimal example that can be used to reproduce the issue
openapi: 3.0.0
info:
version: 1.0.0
title: A minimal OpenAPI example
paths:
/foo:
post:
requestBody:
content:
application/json:
schema:
type: object
required: true
responses:
"200":
description: Successful operation
"400":
description: Invalid operationGeneration Details
openapi-generator-cli generate -i $(OAS_FILE) -g elixir -o local/out/elixir