-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Hello.
I noticed an incorrect model generation for date-time type with allOf
using: OffsetDateTime
is not imported.
openapi.yaml
:
openapi: 3.0.2
info:
title: openapi-processor-spring sample api
version: 1.0.0
paths:
/test:
get:
tags:
- test
responses:
'200':
description: echo of the source parameter
content:
text/plain:
schema:
$ref: '#/components/schemas/Model'
components:
schemas:
SubModelWithDateTime:
type: object
properties:
dateTime:
type: string
format: date-time
SubModel:
type: object
properties:
name:
type: string
Model:
type: object
allOf:
- $ref: '#/components/schemas/SubModelWithDateTime'
- $ref: '#/components/schemas/SubModel'
Expected result: all classes are imported.
Actual result: OffsetDateTime
is not imported:
package io.openapiprocessor.model;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Model {
@JsonProperty("dateTime")
private OffsetDateTime dateTime;
@JsonProperty("name")
private String name;
public OffsetDateTime getDateTime() {
return dateTime;
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Thank you.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working