Bug Report Checklist
Description
The Pojo and Jackson annotation templates are not honoring required fields in the spec. Adjacent @JsonBProperty annotations do.
Expected annotations with required fields:
@JsonProperty(value = JSON_PROPERTY_NAME, required = true)
Actual annotations
@JsonProperty(JSON_PROPERTY_NAME)
openapi-generator version
master
OpenAPI declaration file content or url
openapi: 3.0.0
info:
title: 'Some API'
version: 1.0.0
servers:
- url: 'https://localhost'
paths:
/v1/some_path:
get:
responses:
'200':
content:
application/json:
schema:
type: object
properties:
foo:
type: string
required:
- foo
description: "some description"
Steps to reproduce
- Have a spec with any required field
- Run the Java codegen with Jackson serialization
- See the generated model is not honoring required in the @JsonProperty annotation
Related issues/PRs
Have searched but not found any.
Suggest a fix
I will submit a PR with changes for further consideration.
Bug Report Checklist
Description
The Pojo and Jackson annotation templates are not honoring required fields in the spec. Adjacent @JsonBProperty annotations do.
Expected annotations with required fields:
@JsonProperty(value = JSON_PROPERTY_NAME, required = true)Actual annotations
@JsonProperty(JSON_PROPERTY_NAME)openapi-generator version
master
OpenAPI declaration file content or url
Steps to reproduce
Related issues/PRs
Have searched but not found any.
Suggest a fix
I will submit a PR with changes for further consideration.