fix(cli): Generated examples omit optional fields when not explicitly set. #9083
ci.yml
on: pull_request
ts-generator-changes
21s
lint
2m 22s
compile
2m 54s
eslint
2m 0s
test
5m 2s
ete-tests
4m 52s
live-test-dev
0s
live-test-dev-windows
0s
node-version-tests
0s
cloudflare-startup-tests
0s
browser-startup-tests
0s
Annotations
6 errors and 7 warnings
lint
Process completed with exit code 1.
|
src/tests/dependencies/dependencies.test.ts > dependencies > file dependencies:
packages/cli/ete-tests/src/tests/dependencies/dependencies.test.ts#L22
Error: Snapshot `dependencies > file dependencies 1` mismatched
Expected: "705001"
Received: "670630"
❯ src/tests/dependencies/dependencies.test.ts:22:27
|
src/tests/write-definition/writeDefinition.test.ts > validate > petstore:
packages/cli/ete-tests/src/tests/write-definition/writeDefinition.test.ts#L44
Error: Snapshot `validate > petstore 1` mismatched
- Expected
+ Received
@@ -53,11 +53,10 @@
examples:
- response:
body:
- id: 1000000
name: name
- tag: tag
method: GET
path: /pets
request:
name: ListPetsRequest
query-parameters:
@@ -79,11 +78,10 @@
petId: petId
response:
body:
id: 1000000
name: name
- tag: tag
method: GET
path: /pets/{petId}
path-parameters:
petId:
docs: The id of the pet to retrieve
❯ src/tests/write-definition/writeDefinition.test.ts:44:102
|
src/tests/write-definition/writeDefinition.test.ts > validate namespaced API > namespaced:
packages/cli/ete-tests/src/tests/write-definition/writeDefinition.test.ts#L44
Error: Snapshot `validate namespaced API > namespaced 1` mismatched
- Expected
+ Received
@@ -83,14 +83,11 @@
display-name: List all pets
examples:
- response:
body:
- id: 1000000
- messages:
- - key: value
name: name
- tag: tag
method: GET
path: /pets
request:
name: ListPetsRequest
query-parameters:
@@ -111,14 +108,11 @@
- path-parameters:
petId: petId
response:
body:
id: 1000000
- messages:
- - key: value
name: name
- tag: tag
method: GET
path: /pets/{petId}
path-parameters:
petId:
docs: The id of the pet to retrieve
@@ -836,11 +830,10 @@
id: b2e783e1-c824-4d63-b37a-d8d698862f1d
passenger_name: Jane Smith
trip_id: b2e783e1-c824-4d63-b37a-d8d698862f1d
links:
next: https://api.example.com/bookings?page=2
- prev: prev
self: https://api.example.com/bookings
method: GET
path: /bookings
response:
docs: A list of bookings
@@ -1099,21 +1092,15 @@
data:
- address: Invalidenstraße 10557 Berlin, Germany
country_code: DE
id: efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
name: Berlin Hauptbahnhof
- pet:
- id: 1000000
- name: name
timezone: Europe/Berlin
- address: 18 Rue de Dunkerque 75010 Paris, France
country_code: FR
id: b2e783e1-c824-4d63-b37a-d8d698862f1d
name: Paris Gare du Nord
- pet:
- id: 1000000
- name: name
timezone: Europe/Paris
links:
next: https://api.example.com/stations?page=3
prev: https://api.example.com/stations?page=1
self: https://api.example.com/stations&page=2
@@ -1238,11 +1225,10 @@
origin: b2e783e1-c824-4d63-b37a-d8d698862f1d
price: 50
links:
next: >-
https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2
- prev: prev
self: >-
https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01
method: GET
path: /trips
request:
❯ src/tests/write-definition/writeDefinition.test.ts:44:102
|
src/tests/write-definition/writeDefinition.test.ts > validate header overrides > header-overrides:
packages/cli/ete-tests/src/tests/write-definition/writeDefinition.test.ts#L44
Error: Snapshot `validate header overrides > header-overrides 1` mismatched
- Expected
+ Received
@@ -55,11 +55,10 @@
examples:
- response:
body:
- id: 1000000
name: name
- tag: tag
method: GET
path: /pets
request:
name: ListPetsRequest
query-parameters:
@@ -81,11 +80,10 @@
petId: petId
response:
body:
id: 1000000
name: name
- tag: tag
method: GET
path: /pets/{petId}
path-parameters:
petId:
docs: The id of the pet to retrieve
❯ src/tests/write-definition/writeDefinition.test.ts:44:102
|
ete-tests
Process completed with exit code 1.
|
ts-generator-changes
The process '/usr/bin/git' failed with exit code 128
|
eslint
The process '/usr/bin/git' failed with exit code 128
|
lint
The process '/usr/bin/git' failed with exit code 128
|
compile
The process '/usr/bin/git' failed with exit code 128
|
ete-tests
The process '/usr/bin/git' failed with exit code 128
|
test
The process '/usr/bin/git' failed with exit code 128
|
test
Restore cache failed: Dependencies file is not found in /home/runner/work/fern/fern. Supported file pattern: go.sum
|