Skip to content

Commit

Permalink
fix(cli): respect null examples when generating OpenAPI -> IR (#5296)
Browse files Browse the repository at this point in the history
* Respect null examples.

* Exclusively filter in optional case; attach updated snapshots.

* Update cli rc version.

* chore: update changelog

---------

Co-authored-by: fern-bot <fern-bot@users.noreply.github.com>
  • Loading branch information
eyw520 and fern-bot authored Nov 29, 2024
1 parent 3286b1f commit 7ec059c
Show file tree
Hide file tree
Showing 30 changed files with 14,932 additions and 99,334 deletions.
4 changes: 4 additions & 0 deletions fern/pages/changelogs/cli/2024-11-29.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.45.1-rc0
**`(fix):`** Generate valid examples using spec validation information; respect `null` entries during example generation.


Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ export class ExampleTypeFactory {
) {
return undefined;
}
if (Object.is(example, null)) {
return undefined;
}
const result = this.buildExampleHelper({
schema: schema.value,
visitedSchemaIds,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9468,10 +9468,6 @@ enriched = sdk.transactions.create([
},
],
},
"error": {
"code": "account_holder_not_found",
"message": "message",
},
"id": "xbx8YP14g565Xk",
"location": {
"raw_address": "Nw 43rd Street 5480, Gainesville, Florida 32653, US",
Expand Down Expand Up @@ -9969,9 +9965,6 @@ service:
google_maps_url: >-
https://www.google.com/maps/search/?api=1&query=29.704558,-82.389277
apple_maps_url: https://maps.apple.com/?q=29.704558,-82.389277
error:
code: account_holder_not_found
message: message
created_at: '2024-03-30T00:00:00Z'
id: xbx8YP14g565Xk
code-samples:
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3440,7 +3440,6 @@ Log.d("TAG", group.toString())
"body": {
"cdn_url": "https://ucarecdn.com/0d712319-b970-4602-850c-bae1ced521a6~1/",
"datetime_created": "2018-09-12T10:03:38Z",
"datetime_stored": "2024-01-15T09:30:00Z",
"files": [
{
"content_info": {
Expand Down Expand Up @@ -3642,7 +3641,6 @@ Log.d("TAG", group.toString())
"body": {
"cdn_url": "https://ucarecdn.com/0d712319-b970-4602-850c-bae1ced521a6~1/",
"datetime_created": "2018-09-12T10:03:38Z",
"datetime_stored": "2024-01-15T09:30:00Z",
"files": [
{
"content_info": {
Expand Down Expand Up @@ -3800,7 +3798,6 @@ service:
body:
id: 0d712319-b970-4602-850c-bae1ced521a6~1
datetime_created: '2018-09-12T10:03:38Z'
datetime_stored: '2024-01-15T09:30:00Z'
files_count: 1
cdn_url: https://ucarecdn.com/0d712319-b970-4602-850c-bae1ced521a6~1/
url: >-
Expand Down Expand Up @@ -3982,7 +3979,6 @@ service:
body:
id: 0d712319-b970-4602-850c-bae1ced521a6~1
datetime_created: '2018-09-12T10:03:38Z'
datetime_stored: '2024-01-15T09:30:00Z'
files_count: 1
cdn_url: https://ucarecdn.com/0d712319-b970-4602-850c-bae1ced521a6~1/
url: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3323,7 +3323,6 @@ docs: Search
"columns": [
"id",
],
"lastInsertRowid": "lastInsertRowid",
"rows": [
[
1,
Expand Down Expand Up @@ -3694,7 +3693,6 @@ service:
rows:
- - 1
rowsAffected: 0
lastInsertRowid: lastInsertRowid
source:
openapi: ../openapi.yml
display-name: sqlite
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 7ec059c

Please sign in to comment.