Skip to content

Commit

Permalink
Merge pull request #10 from do87/requests-with-contexts
Browse files Browse the repository at this point in the history
add context to requests
  • Loading branch information
do87 authored Dec 20, 2022
2 parents 46db357 + d374ab4 commit d237bca
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 79 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ tidy:
go mod tidy

ske-client:
@go run ./cmd/oapi-codegen -config ./examples/ske-client/cfg.yaml ./examples/ske-client/ske.json
@go run ./cmd/oapi-codegen -config ./examples/ske-client/cfg.yaml ./examples/ske-client/ske.json

custom-client:
@go run ./cmd/oapi-codegen -config ./examples/custom-client-type/cfg.yaml ./examples/custom-client-type/api.yaml
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This repo is a fork of [deepmap/oapi-codegen](https://github.com/do87/oapi-codeg

Only the changes from the original repo are documented below

## Non-config changes

- `NewRequest` has been modified to `NewRequestWithContext`

## Spec tidying

In cases where the OpenAPI spec isn't created by whomever generates the client, a "tidy" functionality is used to make the client more readable / styled as needed
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-client-type/cfg.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: customclienttype
output: custom-client-type.gen.go
output: ./examples/custom-client-type/custom-client-type.gen.go
generate:
models: true
client: true
Expand Down
10 changes: 5 additions & 5 deletions examples/custom-client-type/custom-client-type.gen.go

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

54 changes: 27 additions & 27 deletions examples/ske-client/src/cluster/cluster.go

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

12 changes: 6 additions & 6 deletions examples/ske-client/src/credentials/credentials.go

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

Loading

0 comments on commit d237bca

Please sign in to comment.