Skip to content

Commit

Permalink
Fix the tests according to the u9 branch existing implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lnash94 committed Nov 19, 2024
1 parent 65cb5cf commit 39d643c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ public static Optional<String> getValueForAnnotationFields(AnnotationNode resour
.map(en -> en.toString().trim());
}


public static Optional<Object> getConstantValues(Optional<Symbol> symbol) {
if (symbol.isPresent() && symbol.get() instanceof ConstantSymbol constantSymbol) {
Object constValue = constantSymbol.constValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
components:
schemas:
ErrorPayload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
/student9:
post:
operationId: postStudent9
Expand All @@ -52,13 +52,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Student"
$ref: '#/components/schemas/Student'
"400":
description: BadRequest
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
/student10:
post:
operationId: postStudent10
Expand All @@ -67,20 +67,20 @@ paths:
in: query
required: true
schema:
$ref: "#/components/schemas/Status"
$ref: '#/components/schemas/Status'
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "#/components/schemas/Student"
$ref: '#/components/schemas/Student'
"400":
description: BadRequest
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
/student11:
post:
operationId: postStudent11
Expand All @@ -89,7 +89,7 @@ paths:
in: query
schema:
allOf:
- $ref: "#/components/schemas/Status"
- $ref: '#/components/schemas/Status'
default: ACTIVE
responses:
"201":
Expand All @@ -103,7 +103,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
/student12:
post:
operationId: postStudent12
Expand All @@ -125,7 +125,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
/student13:
post:
operationId: postStudent13
Expand All @@ -134,7 +134,7 @@ paths:
in: query
schema:
allOf:
- $ref: "#/components/schemas/ResourceKind"
- $ref: '#/components/schemas/ResourceKind'
default: Service
responses:
"201":
Expand All @@ -148,7 +148,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorPayload"
$ref: '#/components/schemas/ErrorPayload'
components:
schemas:
ErrorPayload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/Pod"
$ref: '#/components/schemas/Pod'
/services:
get:
operationId: getServices
Expand All @@ -33,7 +33,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/Service"
$ref: '#/components/schemas/Service'
/recB:
get:
operationId: getRecb
Expand All @@ -45,7 +45,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecB"
$ref: '#/components/schemas/RecB'
/recC:
get:
operationId: getRecc
Expand All @@ -57,7 +57,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecC"
$ref: '#/components/schemas/RecC'
/recD:
post:
operationId: postRecd
Expand All @@ -69,7 +69,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecD"
$ref: '#/components/schemas/RecD'
/recE:
post:
operationId: postRece
Expand All @@ -81,7 +81,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecE"
$ref: '#/components/schemas/RecE'
/recH:
post:
operationId: postRech
Expand All @@ -93,7 +93,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecH"
$ref: '#/components/schemas/RecH'
/recI:
post:
operationId: postReci
Expand All @@ -105,7 +105,7 @@ paths:
schema:
type: array
items:
$ref: "#/components/schemas/RecI"
$ref: '#/components/schemas/RecI'
/recJ:
post:
operationId: postRecj
Expand All @@ -115,7 +115,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RecK"
$ref: '#/components/schemas/RecK'
components:
schemas:
Metadata:
Expand All @@ -132,17 +132,17 @@ components:
Pod:
type: object
allOf:
- $ref: "#/components/schemas/Resource"
- $ref: '#/components/schemas/Resource'
- required:
- spec
type: object
properties:
kind:
allOf:
- $ref: "#/components/schemas/ResourceKind"
- $ref: '#/components/schemas/ResourceKind'
default: Pod
spec:
$ref: "#/components/schemas/PodSpec"
$ref: '#/components/schemas/PodSpec'
PodSpec:
required:
- nodeName
Expand All @@ -164,7 +164,7 @@ components:
RecB:
type: object
allOf:
- $ref: "#/components/schemas/RecA"
- $ref: '#/components/schemas/RecA'
- required:
- b
type: object
Expand All @@ -176,7 +176,7 @@ components:
RecC:
type: object
allOf:
- $ref: "#/components/schemas/RecA"
- $ref: '#/components/schemas/RecA'
- required:
- c
type: object
Expand All @@ -191,7 +191,7 @@ components:
RecD:
type: object
allOf:
- $ref: "#/components/schemas/RecA"
- $ref: '#/components/schemas/RecA'
- required:
- d
type: object
Expand All @@ -206,7 +206,7 @@ components:
RecE:
type: object
allOf:
- $ref: "#/components/schemas/RecA"
- $ref: '#/components/schemas/RecA'
- required:
- a
- e
Expand All @@ -227,7 +227,7 @@ components:
RecG:
type: object
allOf:
- $ref: "#/components/schemas/RecF"
- $ref: '#/components/schemas/RecF'
- type: object
properties:
g:
Expand All @@ -237,7 +237,7 @@ components:
RecH:
type: object
allOf:
- $ref: "#/components/schemas/RecG"
- $ref: '#/components/schemas/RecG'
- required:
- f
- g
Expand All @@ -250,7 +250,7 @@ components:
RecI:
type: object
allOf:
- $ref: "#/components/schemas/RecG"
- $ref: '#/components/schemas/RecG'
- required:
- g
- i
Expand All @@ -266,9 +266,9 @@ components:
RecK:
type: object
allOf:
- $ref: "#/components/schemas/RecA"
- $ref: "#/components/schemas/RecF"
- $ref: "#/components/schemas/RecL"
- $ref: '#/components/schemas/RecA'
- $ref: '#/components/schemas/RecF'
- $ref: '#/components/schemas/RecL'
- required:
- a
- first-name
Expand All @@ -295,7 +295,7 @@ components:
Resource:
type: object
allOf:
- $ref: "#/components/schemas/ResourceBase"
- $ref: '#/components/schemas/ResourceBase'
- required:
- spec
type: object
Expand All @@ -304,7 +304,7 @@ components:
type: object
properties: {}
status:
$ref: "#/components/schemas/Status"
$ref: '#/components/schemas/Status'
ResourceBase:
required:
- group
Expand All @@ -318,9 +318,9 @@ components:
version:
type: string
kind:
$ref: "#/components/schemas/ResourceKind"
$ref: '#/components/schemas/ResourceKind'
metadata:
$ref: "#/components/schemas/Metadata"
$ref: '#/components/schemas/Metadata'
ResourceKind:
type: string
enum:
Expand All @@ -329,17 +329,17 @@ components:
Service:
type: object
allOf:
- $ref: "#/components/schemas/Resource"
- $ref: '#/components/schemas/Resource'
- required:
- spec
type: object
properties:
kind:
allOf:
- $ref: "#/components/schemas/ResourceKind"
- $ref: '#/components/schemas/ResourceKind'
default: Service
spec:
$ref: "#/components/schemas/ServiceSpec"
$ref: '#/components/schemas/ServiceSpec'
ServiceSpec:
required:
- clusterIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public type ServiceSpec record {
string clusterIP;
};

public type AcceptedRecK record {|
*http:Accepted;
RecK body;
map<string|string[]> headers;
|};

public type Service record {
*Resource;
ResourceKind kind = "Service";
Expand Down Expand Up @@ -109,8 +115,3 @@ public type RecI record {
string i;
int g;
};

public type RecKAccepted record {|
*http:Accepted;
RecK body;
|};

0 comments on commit 39d643c

Please sign in to comment.