Skip to content

Commit

Permalink
Update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
TharmiganK committed Dec 15, 2023
1 parent 8aa2a5c commit 39bf860
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,22 @@ public type BalSubTypes record {|
BalXmls xmls;
|};

type Unsigned8 int:Unsigned8;
type Unsigned16 int:Unsigned16;
type Unsigned32 int:Unsigned32;
type Signed8 int:Signed8;
type Signed16 int:Signed16;
type Signed32 int:Signed32;
type Char string:Char;
type XmlElement xml:Element;
type XmlComment xml:Comment;
type XmlText xml:Text;
type XmlProcessingInstruction xml:ProcessingInstruction;


service /payloadV on new http:Listener(9090) {

resource function get path() returns BalSubTypes {
resource function get path1() returns BalSubTypes {
return {
char: "a",
ints: {
Expand All @@ -55,4 +68,12 @@ service /payloadV on new http:Listener(9090) {
}
};
}

resource function get path2() returns Unsigned8|Unsigned16|Unsigned32|
Signed8|Signed16|Signed32|
XmlElement|XmlComment|XmlText|XmlProcessingInstruction|
Char {

return 32;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,54 @@ servers:
port:
default: "9090"
paths:
/path:
/path1:
get:
operationId: getPath
operationId: getPath1
responses:
"200":
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/BalSubTypes'
/path2:
get:
operationId: getPath2
responses:
"200":
description: Ok
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Unsigned8'
- $ref: '#/components/schemas/Unsigned16'
- $ref: '#/components/schemas/Unsigned32'
- $ref: '#/components/schemas/Signed8'
- $ref: '#/components/schemas/Signed16'
- $ref: '#/components/schemas/Signed32'
- $ref: '#/components/schemas/XmlElement'
- $ref: '#/components/schemas/XmlComment'
- $ref: '#/components/schemas/XmlText'
- $ref: '#/components/schemas/XmlProcessingInstruction'
- $ref: '#/components/schemas/Char'
components:
schemas:
BalInts:
required:
- signed
- unsigned
type: object
properties:
signed:
$ref: '#/components/schemas/BalSignedInts'
unsigned:
$ref: '#/components/schemas/BalUnsignedInts'
Signed32:
type: integer
format: int32
Signed8:
type: integer
BalSubTypes:
required:
- char
Expand All @@ -35,6 +71,10 @@ components:
$ref: '#/components/schemas/BalInts'
xmls:
$ref: '#/components/schemas/BalXmls'
Unsigned8:
type: integer
Signed16:
type: integer
BalUnsignedInts:
required:
- unsigned16
Expand All @@ -48,6 +88,10 @@ components:
type: integer
unsigned8:
type: integer
XmlProcessingInstruction:
type: object
Unsigned32:
type: integer
BalXmls:
required:
- comment
Expand All @@ -60,16 +104,12 @@ components:
element: {}
processingInstruction: {}
text: {}
BalInts:
required:
- signed
- unsigned
Char:
type: string
XmlComment:
type: object
XmlElement:
type: object
properties:
signed:
$ref: '#/components/schemas/BalSignedInts'
unsigned:
$ref: '#/components/schemas/BalUnsignedInts'
BalSignedInts:
required:
- signed16
Expand All @@ -84,3 +124,7 @@ components:
type: integer
signed8:
type: integer
Unsigned16:
type: integer
XmlText:
type: object

0 comments on commit 39bf860

Please sign in to comment.