Update opeanpi-generator dependencies (#14328)

* update openapi-generator dep

* update dep, fix tests with new spec

* update kotlin version

* revert cafferine version

* add back testng version and scope
This commit is contained in:
William Cheng 2022-12-28 17:28:07 +08:00 committed by GitHub
parent 04ebe9e1a0
commit 3a8265b6ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 387 additions and 12 deletions

View File

@ -333,7 +333,7 @@
<dependency> <dependency>
<groupId>com.github.javaparser</groupId> <groupId>com.github.javaparser</groupId>
<artifactId>javaparser-core</artifactId> <artifactId>javaparser-core</artifactId>
<version>3.24.0</version> <version>3.24.9</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -356,7 +356,7 @@
<dependency> <dependency>
<groupId>org.commonmark</groupId> <groupId>org.commonmark</groupId>
<artifactId>commonmark</artifactId> <artifactId>commonmark</artifactId>
<version>0.20.0</version> <version>0.21.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>

View File

@ -128,7 +128,7 @@ public class PythonLegacyClientCodegenTest {
@Test(description = "convert a python model with dots") @Test(description = "convert a python model with dots")
public void modelTest() { public void modelTest() {
final OpenAPI openAPI= TestUtils.parseFlattenSpec("src/test/resources/2_0/v1beta3.json"); final OpenAPI openAPI= TestUtils.parseFlattenSpec("src/test/resources/3_0/v1beta3.yaml");
final DefaultCodegen codegen = new PythonLegacyClientCodegen(); final DefaultCodegen codegen = new PythonLegacyClientCodegen();
codegen.setOpenAPI(openAPI); codegen.setOpenAPI(openAPI);

View File

@ -127,7 +127,7 @@ public class PythonNextgenClientCodegenTest {
@Test(description = "convert a python model with dots") @Test(description = "convert a python model with dots")
public void modelTest() { public void modelTest() {
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/v1beta3.json"); final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/v1beta3.yaml");
final DefaultCodegen codegen = new PythonNextgenClientCodegen(); final DefaultCodegen codegen = new PythonNextgenClientCodegen();
codegen.setOpenAPI(openAPI); codegen.setOpenAPI(openAPI);

View File

@ -50,7 +50,7 @@ public class PythonPriorClientTest {
@Test(description = "convert a python model with dots") @Test(description = "convert a python model with dots")
public void modelTest() { public void modelTest() {
final OpenAPI openAPI= TestUtils.parseFlattenSpec("src/test/resources/2_0/v1beta3.json"); final OpenAPI openAPI= TestUtils.parseFlattenSpec("src/test/resources/3_0/v1beta3.yaml");
final DefaultCodegen codegen = new PythonPriorClientCodegen(); final DefaultCodegen codegen = new PythonPriorClientCodegen();
codegen.setOpenAPI(openAPI); codegen.setOpenAPI(openAPI);

View File

@ -0,0 +1,375 @@
openapi: 3.0.1
info:
version: v1beta3
servers:
- url: https://127.0.0.1:6443/
paths:
/api/v1beta3/namespaces/{namespaces}/bindings:
post:
operationId: createBinding
parameters:
- description: "object name and auth scope, such as for teams and projects"
in: path
name: namespaces
required: true
schema:
type: string
requestBody:
content:
'*/*':
schema:
$ref: '#/components/schemas/v1beta3.Binding'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/v1beta3.Binding'
description: success
summary: create a Binding
tags:
- apiv1beta3
x-codegen-request-body-name: body
x-content-type: '*/*'
x-accepts: application/json
/api/v1beta3/namespaces/{namespaces}/componentstatuses/{name}:
get:
operationId: readComponentStatus
parameters:
- description: name of the ComponentStatus
in: path
name: name
required: true
schema:
type: string
- description: "object name and auth scope, such as for teams and projects"
in: path
name: namespaces
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/v1beta3.ComponentStatus'
description: success
summary: read the specified ComponentStatus
tags:
- apiv1beta3
x-accepts: application/json
/api/v1beta3/namespaces/{namespaces}/componentstatuses:
get:
operationId: listComponentStatus
parameters:
- description: "object name and auth scope, such as for teams and projects"
in: path
name: namespaces
required: true
schema:
type: string
- description: a selector to restrict the list of returned objects by their
fields; defaults to everything
in: query
name: fieldSelector
schema:
type: string
- description: a selector to restrict the list of returned objects by their
labels; defaults to everything
in: query
name: labelSelector
schema:
type: string
- description: "when specified with a watch call, shows changes that occur after\
\ that particular version of a resource; defaults to changes from the beginning\
\ of history"
in: query
name: resourceVersion
schema:
type: string
- description: "watch for changes to the described resources and return them\
\ as a stream of add, update, and remove notifications; specify resourceVersion"
in: query
name: watch
schema:
type: boolean
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/v1beta3.ComponentStatusList'
description: success
summary: list objects of kind ComponentStatus
tags:
- apiv1beta3
x-accepts: application/json
components:
schemas:
v1beta3.ComponentStatus:
example:
metadata:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
apiVersion: apiVersion
kind: kind
conditions:
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
properties:
apiVersion:
description: version of the schema the object should have
type: string
conditions:
description: list of component conditions observed
items:
$ref: '#/components/schemas/v1beta3.ObjectReference'
type: array
kind:
description: "kind of object, in CamelCase; cannot be updated"
type: string
metadata:
$ref: '#/components/schemas/v1beta3.ObjectMeta'
type: object
v1beta3.ObjectMeta:
example:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
properties:
annotations:
description: map model with key property names to any type
type: object
creationTimestamp:
description: "RFC 3339 date and time at which the object was created; populated\
\ by the system, read-only; null for lists"
type: string
deletionTimestamp:
description: "RFC 3339 date and time at which the object will be deleted;\
\ populated by the system when a graceful deletion is requested, read-only;\
\ if not set, graceful deletion of the object has not been requested"
type: string
generateName:
description: "an optional prefix to use to generate a unique name; has the\
\ same validation rules as name; optional, and is applied only name if\
\ is not specified"
type: string
labels:
description: map model with key property names to any type
type: object
name:
description: string that identifies an object. Must be unique within a namespace;
cannot be updated
type: string
namespace:
description: namespace of the object; cannot be updated
type: string
resourceVersion:
description: "string that identifies the internal version of this object\
\ that can be used by clients to determine when objects have changed;\
\ populated by the system, read-only; value must be treated as opaque\
\ by clients and passed unmodified back to the server: http://docs.k8s.io/api-conventions.md#concurrency-control-and-consistency"
type: string
selfLink:
description: "URL for the object; populated by the system, read-only"
type: string
uid:
description: unique UUID across space and time; populated by the system;
read-only
type: string
type: object
v1beta3.ComponentStatusList:
example:
metadata:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
apiVersion: apiVersion
kind: kind
items:
- metadata:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
apiVersion: apiVersion
kind: kind
conditions:
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
- metadata:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
apiVersion: apiVersion
kind: kind
conditions:
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
- uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
properties:
apiVersion:
description: version of the schema the object should have
type: string
items:
description: list of component status objects
items:
$ref: '#/components/schemas/v1beta3.ComponentStatus'
type: array
kind:
description: "kind of object, in CamelCase; cannot be updated"
type: string
metadata:
$ref: '#/components/schemas/v1beta3.ObjectMeta'
required:
- items
type: object
v1beta3.Binding:
example:
metadata:
uid: uid
resourceVersion: resourceVersion
creationTimestamp: creationTimestamp
name: name
namespace: namespace
annotations: "{}"
generateName: generateName
deletionTimestamp: deletionTimestamp
labels: "{}"
selfLink: selfLink
apiVersion: apiVersion
kind: kind
target:
uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
properties:
apiVersion:
description: version of the schema the object should have
type: string
kind:
description: "kind of object, in CamelCase; cannot be updated"
type: string
metadata:
$ref: '#/components/schemas/v1beta3.ObjectMeta'
target:
$ref: '#/components/schemas/v1beta3.ObjectReference'
required:
- target
type: object
v1beta3.ObjectReference:
example:
uid: uid
apiVersion: apiVersion
kind: kind
resourceVersion: resourceVersion
fieldPath: fieldPath
name: name
namespace: namespace
properties:
apiVersion:
description: API version of the referent
type: string
fieldPath:
description: "if referring to a piece of an object instead of an entire\
\ object, this string should contain a valid JSON/Go field access statement,\
\ such as desiredState.manifest.containers[2]"
type: string
kind:
description: kind of the referent
type: string
name:
description: name of the referent
type: string
namespace:
description: namespace of the referent
type: string
resourceVersion:
description: "specific resourceVersion to which this reference is made,\
\ if any: http://docs.k8s.io/api-conventions.md#concurrency-control-and-consistency"
type: string
uid:
description: uid of the referent
type: string
type: object
any:
description: map model with key property names to any type
type: object
x-original-swagger-version: "2.0"

14
pom.xml
View File

@ -1477,22 +1477,22 @@
<groovy.version>3.0.9</groovy.version> <groovy.version>3.0.9</groovy.version>
<guava.version>31.1-jre</guava.version> <guava.version>31.1-jre</guava.version>
<handlebars-java.version>4.2.1</handlebars-java.version> <handlebars-java.version>4.2.1</handlebars-java.version>
<jackson-threetenbp.version>2.10.0</jackson-threetenbp.version> <jackson-threetenbp.version>2.12.5</jackson-threetenbp.version>
<jackson-databind.version>2.13.4.2</jackson-databind.version> <jackson-databind.version>2.14.0</jackson-databind.version>
<jackson.version>2.13.4</jackson.version> <jackson.version>2.14.0</jackson.version>
<jacoco.version>0.8.7</jacoco.version> <jacoco.version>0.8.7</jacoco.version>
<jmustache.version>1.14</jmustache.version> <jmustache.version>1.15</jmustache.version>
<junit.version>4.13.2</junit.version> <junit.version>4.13.2</junit.version>
<kotlin.version>1.6.10</kotlin.version> <kotlin.version>1.6.21</kotlin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version> <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version> <maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
<maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version> <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version> <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-site-plugin.version>3.7.1</maven-site-plugin.version> <maven-site-plugin.version>3.7.1</maven-site-plugin.version>
<mockito.version>4.8.1</mockito.version> <mockito.version>4.10.0</mockito.version>
<pmd-plugin.version>3.12.0</pmd-plugin.version> <pmd-plugin.version>3.12.0</pmd-plugin.version>
<reflections.version>0.10</reflections.version> <reflections.version>0.10.2</reflections.version>
<rxgen.version>1.4</rxgen.version> <rxgen.version>1.4</rxgen.version>
<scala-maven-plugin.version>4.6.1</scala-maven-plugin.version> <scala-maven-plugin.version>4.6.1</scala-maven-plugin.version>
<slf4j.version>1.7.36</slf4j.version> <slf4j.version>1.7.36</slf4j.version>