Skip to content
Advertisement

OpenAPI generator Java Client SE

I’ve an OperAPI like this, with content “application/x-www-form-urlencoded” that i must use (the external API to implement support only that):

JavaScript

The OpenAPI Generator Maven’s plugin creates a request class “GenerateTokenRequest” for the schema object but in API implementation class it doesn’t use. It generate a method with all requested fields as a list of parameter. The method is this:

JavaScript

So, in this case the request class “GenerateTokenRequest” is generated but never used. Anyone can say me why? There is an alternative way for using my request class? Can I change something in OpenAPI file structure? Or there is a way to avoid the generation of the request class?


EDIT: Solved! The service i wanted to define was an OAuth2 authentication service so i’ve configured a securitySchemas of type “oauth2”

Advertisement

Answer

Solved! The service i wanted to define was an OAuth2 authentication service so i’ve configured a securitySchemas of type “oauth2”

Advertisement