Skip to content

Commit

Permalink
(feature): Add encoding and source nodes (#4240)
Browse files Browse the repository at this point in the history
  • Loading branch information
amckinney authored Aug 9, 2024
1 parent 3b30245 commit e21a1e9
Show file tree
Hide file tree
Showing 854 changed files with 157,461 additions and 1,272,663 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ seed/** linguist-generated=true
seed/**/seed.yml linguist-generated=false
seed/**/.mock linguist-generated=true
packages/ir-sdk/src/sdk/** linguist-generated=true
*fhir.json filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -124,6 +126,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -158,6 +162,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -199,6 +205,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -240,6 +248,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -281,6 +291,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -315,6 +327,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -349,6 +363,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -383,6 +399,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -417,6 +435,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -451,6 +471,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -485,6 +507,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -519,6 +543,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -553,6 +579,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -587,6 +615,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -621,6 +651,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -655,6 +687,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/setup-seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
run: yarn install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
github_token: ${{ github.token }}

- uses: actions/setup-go@v5
with:
Expand Down
34 changes: 33 additions & 1 deletion fern.schema.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@
},
"additionalProperties": false
},
"source": {
"anyOf": [
{
"type": "object",
"properties": {
"proto": {
"type": "string",
"description": "The Protobuf filepath that defined this node."
}
},
"required": ["proto"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"openapi": {
"type": "string",
"description": "The OpenAPI filepath that defined this node."
}
},
"required": ["openapi"],
"additionalProperties": false
}
]
},
"extensions": { "type": "object", "additionalProperties": {} },
"extends": {
"anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }]
Expand Down Expand Up @@ -147,6 +173,7 @@
"encoding": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding"
},
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"extensions": { "type": "object", "additionalProperties": {} },
"extends": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/extends"
Expand Down Expand Up @@ -176,6 +203,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"base-properties": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -257,6 +285,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"type": { "type": "string" },
"validation": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/properties/additionalProperties/anyOf/1/properties/validation"
Expand All @@ -277,6 +306,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"default": { "type": "string" },
"enum": {
"type": "array",
Expand Down Expand Up @@ -326,6 +356,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"union": {
"type": "array",
"items": {
Expand Down Expand Up @@ -822,7 +853,8 @@
"required": ["path"],
"additionalProperties": false
}
}
},
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" }
},
"required": ["auth", "base-path", "endpoints"],
"additionalProperties": false
Expand Down
34 changes: 33 additions & 1 deletion fern.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@
},
"additionalProperties": false
},
"source": {
"anyOf": [
{
"type": "object",
"properties": {
"proto": {
"type": "string",
"description": "The Protobuf filepath that defined this node."
}
},
"required": ["proto"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"openapi": {
"type": "string",
"description": "The OpenAPI filepath that defined this node."
}
},
"required": ["openapi"],
"additionalProperties": false
}
]
},
"extensions": { "type": "object", "additionalProperties": {} },
"extends": {
"anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }]
Expand Down Expand Up @@ -147,6 +173,7 @@
"encoding": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding"
},
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"extensions": { "type": "object", "additionalProperties": {} },
"extends": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/extends"
Expand Down Expand Up @@ -176,6 +203,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"base-properties": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -257,6 +285,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"type": { "type": "string" },
"validation": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/properties/additionalProperties/anyOf/1/properties/validation"
Expand All @@ -277,6 +306,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"default": { "type": "string" },
"enum": {
"type": "array",
Expand Down Expand Up @@ -326,6 +356,7 @@
},
"examples": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/examples" },
"encoding": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/encoding" },
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" },
"union": {
"type": "array",
"items": {
Expand Down Expand Up @@ -822,7 +853,8 @@
"required": ["path"],
"additionalProperties": false
}
}
},
"source": { "$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/source" }
},
"required": ["auth", "base-path", "endpoints"],
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export async function generateOpenAPIIrForWorkspaces({
}
const openAPISpecs = await getAllOpenAPISpecs({ context, specs: workspace.specs });
const openAPIIr = await parse({
absoluteFilePathToWorkspace: workspace.absoluteFilepath,
specs: openAPISpecs,
taskContext: context
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async function writeDefinitionForOpenAPIWorkspace({
const specs = await getAllOpenAPISpecs({ context, specs: workspace.specs });
for (const spec of specs) {
const ir = await parse({
absoluteFilePathToWorkspace: workspace.absoluteFilepath,
specs: [spec],
taskContext: context
});
Expand Down
Loading

0 comments on commit e21a1e9

Please sign in to comment.