[BUG] Description
Created by: neclimdul
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Documentation for swagger generated code seems to be missing the content type.
openapi-generator version
3.0.0-latest
This is a regression from swagger-codegen-cli where it is generated correctly.
OpenAPI declaration file content or url
swagger: '2.0'
info:
title: test
version: 1.0.0
consumes:
- application/json
produces:
- application/json
paths:
/person:
post:
operationId: createPerson
responses:
200:
description: "Success"
schema:
type: object
Command line used for generation
I didn't test all generators but I did check java and php and the problem existed in both so it seems to be an underlying problem.
docker run --rm -v ${PWD}:/local/ openapitools/openapi-generator-cli:latest generate \
-i /local/test.yaml -g java -o /local/.build
Steps to reproduce
- build the code using the above command
- Inspect the generated markdown in the documentation folder.
Expected:
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
Actual:
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
ambiguous set of steps to reproduce the bug.-->