Skip to content

Commit

Permalink
fix(cli): send max as max length (#5238)
Browse files Browse the repository at this point in the history
* fix(cli): send `max` as max length

* Update snapshots

---------

Co-authored-by: Eden <eden@buildwithfern.com>
  • Loading branch information
dsinghvi and eyw520 authored Nov 21, 2024
1 parent e49cbf3 commit c34986a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,35 @@ exports[`fern api update unioned > fern api update unioned 1`] = `
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Station"
"allOf": [
{
"$ref": "#/components/schemas/Wrapper-Collection"
},
{
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Station"
}
}
}
},
{
"properties": {
"links": {
"allOf": [
{
"$ref": "#/components/schemas/Links-Self"
},
{
"$ref": "#/components/schemas/Links-Pagination"
}
]
}
}
}
}
]
},
"example": {
"data": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,35 @@ exports[`fern api update > fern api update 1`] = `
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Station"
"allOf": [
{
"$ref": "#/components/schemas/Wrapper-Collection"
},
{
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Station"
}
}
}
},
{
"properties": {
"links": {
"allOf": [
{
"$ref": "#/components/schemas/Links-Self"
},
{
"$ref": "#/components/schemas/Links-Pagination"
}
]
}
}
}
}
]
},
"example": {
"data": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"value": {
"type": "string",
"minLength": 2,
"maxLength": 2
"maxLength": 26
}
}
}
Expand All @@ -65,7 +65,7 @@
"value": {
"type": "string",
"minLength": 4,
"maxLength": 4
"maxLength": 256
}
}
}
Expand Down Expand Up @@ -127,7 +127,7 @@
"type": "string",
"regex": "^[a-z]+$",
"minLength": 3,
"maxLength": 3,
"maxLength": 10,
"default": "fern"
}
}
Expand Down Expand Up @@ -210,7 +210,7 @@
"type": "string",
"regex": "^[a-z]+$",
"minLength": 3,
"maxLength": 3,
"maxLength": 10,
"default": "fern"
}
}
Expand Down Expand Up @@ -329,7 +329,7 @@
"type": "string",
"regex": "^[a-z]+$",
"minLength": 3,
"maxLength": 3,
"maxLength": 10,
"default": "fern"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function convertString(primitive: Ir.PrimitiveTypeV2 | undefined): FdrCjsSdk.api
type: "string",
regex: rules != null ? rules.pattern : undefined,
minLength: rules != null ? rules.minLength : undefined,
maxLength: rules != null ? rules.minLength : undefined,
maxLength: rules != null ? rules.maxLength : undefined,
default: primitive != null && primitive.type === "string" ? primitive.default : undefined
};
}
Expand Down

0 comments on commit c34986a

Please sign in to comment.