Skip to content

Commit a887f6d

Browse files
authored
Add test for CI suite (#18350)
1 parent 6bcc28d commit a887f6d

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

modules/openapi-generator/src/test/resources/3_0/postman-collection/SampleProject.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ paths:
194194
Update Email:
195195
value:
196196
email: rebecca@gmail.com
197+
verified: true
197198
Update Last Name & Date of Birth:
198199
value:
199200
lastName: Baker

samples/schema/postman-collection/postman.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
],
110110
"body": {
111111
"mode": "raw",
112-
"raw": "{\n \"email\" : \"rebecca@gmail.com\"\n}",
112+
"raw": "{\n \"email\" : \"rebecca@gmail.com\",\n \"verified\" : true\n}",
113113
"options": {
114114
"raw": {
115115
"language": "json"

samples/schema/postman-collection/python/test/test_endpoints.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ def test_request_with_array_strings(self):
3939
# check values
4040
self.assertTrue(set(data.get("tags")) == {"user", "admin", "guest"})
4141

42+
def test_request_boolean_field(self):
43+
# item
44+
item = self.json_data['item'][0]['item'][0]['item'][1]
45+
self.assertEqual(item['name'], 'Update Email')
46+
self.assertEqual(item['request']["method"], 'PATCH')
47+
self.assertEqual(item['request']["body"]["raw"], '{\n "email" : "rebecca@gmail.com",\n "verified" : true\n}')
48+
4249

4350
if __name__ == '__main__':
4451
unittest.main()

0 commit comments

Comments
 (0)