[java rest-assured] default is a reserved keyword
Created by: jmini
Description
When the java generator (with restassured library) creates the project without any tags defined, a DefaultApi
class is created.
In ApiClient
the method to create this API is:
public DefaultApi default() {
return DefaultApi.default(config.baseReqSpec.get());
}
This does not compile, because "default" is a reserved keyword in java.
The method (in this case only) should be named defaultApi()
.
openapi-generator version
3.0.0-SNAPSHOT
OpenAPI declaration file content or url
openapi: 3.0.1
info:
title: ping test
version: '1.0'
servers:
- url: 'http://localhost:8000/'
paths:
/ping:
get:
operationId: pingGet
responses:
'201':
description: OK
Work around
Set a tag on the operations in order to change the default
value to something else.