Skip to content

Commit

Permalink
Implement support for recursive messages (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
loganintech committed May 7, 2024
1 parent 1a786dc commit 07254b8
Show file tree
Hide file tree
Showing 9 changed files with 543 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Run linters
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v5
with:
version: latest
args: --timeout=3m
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ linters:
- exhaustive # check exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- forbidigo # Forbids identifiers
- gochecknoinits # Checks that no init functions are present in Go code
# - gochecknoinits # Checks that no init functions are present in Go code # This linter is currently broken https://github.com/golangci/golangci-lint/issues/4697
- goconst # Finds repeated strings that could be replaced by a constant
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
- godot # Check if comments end in a period
Expand Down
40 changes: 40 additions & 0 deletions example/bookstore/v1/bookstore.pb.apigw.go

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

50 changes: 50 additions & 0 deletions example/bookstore/v1/bookstore.pb.bookstore_service.oas31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,40 @@ components:
title: List Shelves Response
type: object
x-speakeasy-name-override: ListShelvesResponse
bookstore.v1.RecursiveBookResponse:
description: A recursive comment for the recursive response
properties:
anotherProp:
description: This is a non recursive secondary prop
type: string
page:
$ref: '#/components/schemas/bookstore.v1.RecursivePage'
title: Recursive Book Response
type: object
x-speakeasy-name-override: RecursiveBookResponse
bookstore.v1.RecursivePage:
description: A recursive page for the recursive response
properties:
books:
$ref: '#/components/schemas/bookstore.v1.RecursiveBookResponse'
extraPages:
description: This is a list of recursive pages
items:
$ref: '#/components/schemas/bookstore.v1.RecursivePage'
nullable: true
type: array
pages:
description: This is a list of recursive books
items:
$ref: '#/components/schemas/bookstore.v1.RecursiveBookResponse'
nullable: true
type: array
prop:
description: This is a non recursive prop
type: string
title: Recursive Page
type: object
x-speakeasy-name-override: RecursivePage
bookstore.v1.Shelf:
description: A shelf resource.
properties:
Expand Down Expand Up @@ -244,6 +278,22 @@ paths:
- Authors
x-speakeasy-group: Bookstore
x-speakeasy-name-override: GetAuthor
/recursive:
get:
description: Invokes the bookstore.v1.BookstoreService.RecursiveBook method.
operationId: bookstore.v1.BookstoreService.RecursiveBook
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/bookstore.v1.RecursiveBookResponse'
description: A recursive comment for the recursive response
summary: Recursive Book
tags:
- Recursive
x-speakeasy-group: Bookstore
x-speakeasy-name-override: RecursiveBook
/shelf:
post:
description: Creates a new shelf in the bookstore.
Expand Down
Loading

0 comments on commit 07254b8

Please sign in to comment.