Open AnuragGarg89 opened 6 years ago
I looked at your spec, near Link:
you have a strange object:
https://gist.github.com/AnuragGarg89/3118e8ee58f19a9ee87ff775a9265662#file-sdp-yaml-L1179-L1182
I am not sure that this is the root of the problem.
To analyze this issue, it would be great if you can reduce the input spec to a minimal example.
swagger: '2.0'
info:
description: Api Documentation
version: '1.0'
title: Api Documentation
termsOfService: 'urn:tos'
contact: {}
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0'
host: qa.api.sdp.ihsmvals-dev.com
basePath: /
tags:
- name: web-mvc-endpoint-handler-mapping
description: Web Mvc Endpoint Handler Mapping
paths:
/actuator:
get:
tags:
- web-mvc-endpoint-handler-mapping
summary: links
operationId: linksUsingGET
consumes:
- application/json
produces:
- application/json
- application/vnd.spring-boot.actuator.v2+json
responses:
'200':
description: OK
schema:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/definitions/Link'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
definitions:
Batch:
type: object
properties:
batchId:
type: string
snapTime:
type: string
format: date-time
source:
type: string
supplier:
type: string
startTime:
type: string
format: date-time
exchange:
type: string
Link:
type: object
properties:
href:
type: string
templated:
type: boolean
'Map?string,Link?':
type: object
additionalProperties:
$ref: '#/definitions/Link'
Jérémie Bresson - Does this help?
I have edited your example for better readabillity...
Is really 'Map?string,Link?'
really the name of the type that you want?
This might be a valid "Swagger V2 Spec", but it looks wired to me.
Can you not rename it LinksMap
or something similar?
Map«string,Link» this is what it was in my original json
Map«string,Link» this is what it was in my original json
"Map«string,Link»" looks like the name of the type. You should replace it with something more meaningful such as "LinkMap"
Description
mvn compile results in build failure because of missing import of the file org.openapitools.client.model.Link;
openapi-generator version
OpenAPI declaration file content or url
pom.xml and .yaml used for generating java client code: https://gist.github.com/AnuragGarg89/3118e8ee58f19a9ee87ff775a9265662
Steps to reproduce
create a maven project do mvn generate sources using the pom attached do mvn clean compile expected build success actual compilation error and build failure