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

(feature): Add support for .proto inputs #4223

Merged
merged 19 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
204 changes: 34 additions & 170 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.ruby == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -103,16 +95,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.ruby == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -128,16 +112,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Install Poetry
uses: snok/install-poetry@v1
Expand All @@ -160,16 +136,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Install Poetry
uses: snok/install-poetry@v1
Expand All @@ -192,16 +160,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Install Poetry
uses: snok/install-poetry@v1
Expand All @@ -224,16 +184,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.openapi == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -249,16 +201,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.postman == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -274,16 +218,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -299,16 +235,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -324,16 +252,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -349,16 +269,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.typescript == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -374,16 +286,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.typescript == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -399,16 +303,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -424,16 +320,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -449,16 +337,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -474,16 +354,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.csharp == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand All @@ -499,16 +371,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.csharp == 'true' || needs.changes.outputs.seed == 'true' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install
- name: Setup Seed
uses: ./.github/workflows/setup-seed.yml

- name: Seed Test
env:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/setup-seed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Setup Seed

on: workflow_call

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Yarn Install
run: yarn install

- uses: bufbuild/[email protected]

- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/protoc-gen-openapi
1 change: 1 addition & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,27 @@ export interface APIDefinitionSettings {
}

export interface APIDefinitionLocation {
path: string;
schema: APIDefinitionSchema;
origin: string | undefined;
overrides: string | undefined;
audiences: string[] | undefined;
settings: APIDefinitionSettings | undefined;
}

export type APIDefinitionSchema = ProtoAPIDefinitionSchema | OSSAPIDefinitionSchema;

export interface ProtoAPIDefinitionSchema {
type: "protobuf";
root: string;
target: string;
localGeneration: boolean;
}

export interface OSSAPIDefinitionSchema {
type: "oss";
path: string;
}

export interface GeneratorGroup {
groupName: string;
audiences: Audiences;
Expand Down
Loading
Loading