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 resulting openapi.yaml does only show the barList Method:
openapi: 3.0.1
paths:
/barList:
post:
tags:
- Bar
summary: Bar List not in Interface
operationId: barList
requestBody:
content:
'*/*':
schema:
type: array
items:
type: string
responses:
default:
description: default response
content:
'*/*': {}
I figured out, that it does work, when I don't implement the method, so lets say, I got another method in the interface and provide a default implementation:
public interface Foo<T> {
// Method. thats being implemented
Response fooList(List<T> foo);
// Method, thats not being implemented
@POST
@Path("fooListNotImplemented")
@Operation(summary = "Foo List not implemented", tags = "Foo")
default Response fooListNotImplemented(List<T> fooNotImplemented) {
return null;
}
}
The method fooListNotImplemented does show up, fooList does not show up:
openapi: 3.0.1
paths:
/barList:
post:
tags:
- Bar
summary: Bar List not in Interface
operationId: barList
requestBody:
content:
'*/*':
schema:
type: array
items:
type: string
responses:
default:
description: default response
content:
'*/*': {}
/fooListNotImplemented:
post:
tags:
- Foo
summary: Foo List not implemented
operationId: fooListNotImplemented
requestBody:
content:
'*/*':
schema:
type: array
items:
type: string
responses:
default:
description: default response
content:
'*/*': {}
Hi,
I got a problem, which bothers me for quite a while. I hope i didnt miss anything, but i just can't figure out, whats wrong.
I have a basic rest service:
The fooList endpoint comes from an interface:
The resulting openapi.yaml does only show the barList Method:
I figured out, that it does work, when I don't implement the method, so lets say, I got another method in the interface and provide a default implementation:
The method fooListNotImplemented does show up, fooList does not show up:
pom.xml:
I hope I didnt miss anything stupid. Thank you for your work and have a nice day!
Christopher
The text was updated successfully, but these errors were encountered: