You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The endpoint works properly and returns a json of TypeA or TypeB regarding the case.
And even before, the endpoint was only returning TypeA.class (not AbstractType) and FooDto typescript interface was perfectly generated (and also related restService)
I have the same code for another Abstract class/abstract endpoint where childs contains only string and numbers and no complaints. All is properly generated.
Signature of endpoint where swagger-codegen is issuing:
@ApiOperation(value = "Retrieves a type", response = AbstractType.class)
@GetMapping(path = "/{id}", produces = APPLICATION_JSON_VALUE)
public AbstractType getTypeAorB(...){}
I get this error on objects declared in a child class
Error reading swagger location http://localhost:8080/v2/api-docs: SyntaxError: Error resolving $ref pointer "http://localhost:8080/v2/api-docs#/definitions/FooDto".
Token "FooDto" does not exist.
This code works if both classes, TypeA and TypeB have just primitive property.
But the same code throws the error when TypeA or TypeB contains a property like :
The endpoint works properly and returns a json of TypeA or TypeB regarding the case.
And even before, the endpoint was only returning TypeA.class (not AbstractType) and FooDto typescript interface was perfectly generated (and also related restService)
I have the same code for another Abstract class/abstract endpoint where childs contains only string and numbers and no complaints. All is properly generated.
Signature of endpoint where swagger-codegen is issuing:
springboot 2.6.3
Java 17
angular 9
ng-swagger-gen 1.8.1
pom.xml :
I've install json-parser & mustache
codegen is launched via ng-swagger-gen -i http://localhost:8080/v2/api-docs -o src\app\fooProject\api
Any idea? Huge thanks
The text was updated successfully, but these errors were encountered: