forked from loafle/openapi-generator-original
Add support for controlling output of OpenAPI Generator version in generated files (#17952)
* add initial openapi config and java generated files * add java implementation for adding generator version * regenerate sample client files * remove tabs * only show generated version if build info exists * set build info for batch generation * update generator doc for new global flag * use existing property for generator version * update templates to include generator version * update templates for better generator version syntax * revert undesired changes * regenerate samples for openapi client * update templates to correct formatting/newlines * correct description text and add to usage doc * add generator cli option for all codegen types * use more concise version info; update existing codegens to support new prop * correct wrong prop reference * add initial test coverage for new prop * update last (scala) templates with new prop * update samples after upstream merge * use consistent version output * use better sample project id/name * revert using option for generator version in templates
This commit is contained in:
@@ -4,6 +4,8 @@ OpenAPI Extension x-auth-id-alias
|
||||
|
||||
- API version: 1.0.0
|
||||
|
||||
- Generator version: 7.4.0-SNAPSHOT
|
||||
|
||||
This specification shows how to use x-auth-id-alias extension for API keys.
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
||||
/**
|
||||
* <p>ApiClient class.</p>
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class ApiClient extends JavaTimeFormatter {
|
||||
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* API Exception
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class ApiException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class Configuration {
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Set;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
import javax.ws.rs.ext.ContextResolver;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class JSON implements ContextResolver<ObjectMapper> {
|
||||
private ObjectMapper mapper;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.time.format.DateTimeParseException;
|
||||
* Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class.
|
||||
* It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}.
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class JavaTimeFormatter {
|
||||
|
||||
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
||||
@@ -16,7 +16,7 @@ package org.openapitools.client;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class UsageApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.net.URI;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.net.URI;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class HttpBasicAuth implements Authentication {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.net.URI;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public class HttpBearerAuth implements Authentication {
|
||||
private final String scheme;
|
||||
private String bearerToken;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
/**
|
||||
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.4.0-SNAPSHOT")
|
||||
public abstract class AbstractOpenApiSchema {
|
||||
|
||||
// store the actual instance of the schema/object
|
||||
|
||||
Reference in New Issue
Block a user