Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix, ir-generation: put fully substituted path in url field of auto-generated EndpointExampleCalls #4211

Merged
merged 8 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- 'packages/seed/**'
- 'test-definitions/**'
- 'packages/ir-sdk/fern/apis/**'
- 'packages/cli/generation/ir-generator/**'
ruby:
- 'generators/ruby/**'
- seed/ruby-sdk/seed.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,4 +847,4 @@ exports[`dependencies correctly incorporates dependencies 1`] = `
}"
`;

exports[`dependencies file dependencies 1`] = `3030147`;
exports[`dependencies file dependencies 1`] = `3030381`;
84 changes: 42 additions & 42 deletions packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/create-movie",
"url": "/movies/create-movie",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [],
Expand Down Expand Up @@ -1128,7 +1128,7 @@
}
}
},
"id": "9c48a68c861fcde768d5bd494182ee29b48dc650",
"id": "0fd01d62bca0126c84c6dae0eb32bd903b886a36",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/create-movie",
"url": "/movies/create-movie",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [],
Expand Down Expand Up @@ -1539,7 +1539,7 @@
}
}
},
"id": "9c48a68c861fcde768d5bd494182ee29b48dc650",
"id": "0fd01d62bca0126c84c6dae0eb32bd903b886a36",
"docs": null
}
}
Expand Down Expand Up @@ -2800,7 +2800,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/",
"url": "/movies/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -3378,13 +3378,13 @@
}
}
},
"id": "ba742975f9bc71366d46b57d35a716bbe21892da",
"id": "2fbbd1d9a47777de004873d1c386e0e010f84d09",
"docs": null
}
},
{
"example": {
"url": "/",
"url": "/movies/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -3962,13 +3962,13 @@
}
}
},
"id": "6ca389038cc999a8a30c244831e4889f1acc6e7f",
"id": "bddb18e0df4a21ec0a1d0f2de6f81effa3fe4a52",
"docs": null
}
},
{
"example": {
"url": "/",
"url": "/movies/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -4154,7 +4154,7 @@
},
"body": null
},
"id": "b5cb856c7af35051001932ae7444a503197b2a37",
"id": "caa8c82f67c291fe8638d9e341d06b605b1958c0",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/extended-inline-request-body",
"url": "/extends/extended-inline-request-body",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [],
Expand Down Expand Up @@ -1124,7 +1124,7 @@
"value": null
}
},
"id": "9db0e06195b20a6e69296689bce595a56515cdf6",
"id": "2aae178dd3a5b6259e23f15455b2a5778d924838",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/",
"url": "/type-kaljhv87",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -1068,7 +1068,7 @@
"value": null
}
},
"id": "bd5b4c8c347f4c7c33db01bcd23a51f5325101f0",
"id": "60f447c9c604e52bd229506a8e8d18775ca13261",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/",
"url": "/test/string/string/1/string",
"rootPathParameters": [
{
"name": {
Expand Down Expand Up @@ -564,7 +564,7 @@
"value": null
}
},
"id": "d1240755d4fcd0e4791ccb3ba023d1ac451faa0b",
"id": "6b9ceb20a19eba83fa97fae8168773540db154af",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/path/",
"url": "/path/>/>/red/red",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed this and looking into it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec here:

service:
  auth: false
  base-path: ""
  endpoints:
    send:
      path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}
      method: POST
      path-parameters: 
        operand: root.Operand
        maybeOperand: optional<root.Operand>
        operandOrColor: root.ColorOrOperand
        maybeOperandOrColor: optional<root.ColorOrOperand>
      examples: 
        - path-parameters:
            operand: $root.Operand.GreaterThan
            maybeOperand: $root.Operand.LessThan
            operandOrColor: $root.ColorOrOperand.Red
            maybeOperandOrColor: $root.ColorOrOperand.Red

types: 
  Operand:
    docs: | 
      Tests enum name and value can be 
      different.
    enum:
      - value: ">"
        name: GREATER_THAN 
      - value: "="
        name: EQUAL_TO
      - value: "less_than"
        docs: | 
          The name and value should be similar
          are similar for less than. 
    examples:
      - name: GreaterThan
        value: ">"
      - name: LessThan
        value: "less_than"
  
  Color:
    enum:
      - value: "red"
        name: RED 
      - value: "blue"
        name: BLUE
    examples:
      - name: Red
        value: "red"
  
  ColorOrOperand:
    discriminated: false
    union:
      - Color
      - Operand
    examples:
      - name: Red
        value: "red"

"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -3055,7 +3055,7 @@
"value": null
}
},
"id": "c1548de72a250d65504ad45dc16ca97c778b2899",
"id": "2b72b39a0e4680a410f3497bf6398a4ee14229ca",
"docs": null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20941,7 +20941,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "",
"url": "/file/notification/string",
"rootPathParameters": [],
"servicePathParameters": [
{
Expand Down Expand Up @@ -21426,7 +21426,7 @@
}
}
},
"id": "8267941fb9faada6d04279d1024484e2b159bac7",
"id": "0ab1bbdbe7092554a8727778d360b3ecaaf0ca5b",
"docs": null
}
}
Expand Down Expand Up @@ -22074,7 +22074,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/",
"url": "/file/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -22441,13 +22441,13 @@
}
}
},
"id": "617177e12e7c40c085caf4e6d64bf58243453131",
"id": "5a878fa477bcb2b250598ad8402d31d9acb7d503",
"docs": null
}
},
{
"example": {
"url": "/",
"url": "/file/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -22596,7 +22596,7 @@
},
"body": null
},
"id": "90cf5c8e84f025495f6dbf59506df3bcef4b75f7",
"id": "5beb5b0c84b51e07b25e483cd383a5631c4514ad",
"docs": null
}
}
Expand Down Expand Up @@ -22983,7 +22983,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/check/",
"url": "/check/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -23033,13 +23033,13 @@
"value": null
}
},
"id": "167792918daff89ff3fe9e97af4a0644a7ba69bb",
"id": "15c71575f379fb044c22d12105428d0a224817b8",
"docs": null
}
},
{
"example": {
"url": "/check/",
"url": "/check/string",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -23089,7 +23089,7 @@
"value": null
}
},
"id": "167792918daff89ff3fe9e97af4a0644a7ba69bb",
"id": "15c71575f379fb044c22d12105428d0a224817b8",
"docs": null
}
}
Expand Down Expand Up @@ -25096,7 +25096,7 @@
"autogeneratedExamples": [
{
"example": {
"url": "/movie/",
"url": "/movie/movie-c06a4ad7",
"rootPathParameters": [],
"servicePathParameters": [],
"endpointPathParameters": [
Expand Down Expand Up @@ -26563,7 +26563,7 @@
}
}
},
"id": "80eabb242e924ed2302f4dcbd4e6f2a08845b26b",
"id": "e239592247527a8ef69600cd4147a7369a827613",
"docs": null
}
}
Expand Down
Loading
Loading