Skip to content

Commit

Permalink
client: update openapi-generator to 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Feb 20, 2023
1 parent 437de76 commit a0b0ee6
Show file tree
Hide file tree
Showing 28 changed files with 1,401 additions and 1,916 deletions.
Binary file added gitleaks.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ else
# Versions from https://github.com/OpenAPITools/openapi-generator/releases
@chmod +x ./openapi-generator
@rm -rf ./client
OPENAPI_GENERATOR_VERSION=4.2.2 ./openapi-generator generate --package-name client -i ./api/openapi.yaml -g go -o ./pkg/client
rm -f ./pkg/client/go.mod ./pkg/client/go.sum
OPENAPI_GENERATOR_VERSION=6.4.0 ./openapi-generator generate --git-user-id=moov-io --git-repo-id=metro2 --package-name client -i ./api/openapi.yaml -g go -o ./pkg/client
rm -f ./pkg/client/go.mod ./pkg/client/go.sum ./pkg/client/.travis.yml ./pkg/client/git_push.sh
go fmt ./...
go build github.com/moov-io/metro2/pkg/client
go test ./pkg/client
go test ./pkg/client/...
endif

dist: clean build
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.0
6.4.0
5 changes: 2 additions & 3 deletions pkg/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ Install the following dependencies:

```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
```

Put the package under your project folder and add the following in import:

```golang
import client "github.com/GIT_USER_ID/GIT_REPO_ID"
import client "github.com/moov-io/metro2"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand Down Expand Up @@ -62,7 +61,7 @@ Each operation can use different server URL defined using `OperationServers` map
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```
```golang
ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
Expand Down
176 changes: 117 additions & 59 deletions pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ openapi: 3.0.2
info:
contact:
url: https://github.com/moov-io/metro2
description: Moov Metro2 ([Automated Clearing House](https://en.wikipedia.org/wiki/Automated_Clearing_House))
implements an HTTP API for creating, parsing and validating Metro2 files. Metro2
is an open-source consumer credit history report for credit report file creation
and validation.
description: "Moov Metro2 ([Automated Clearing House](https://en.wikipedia.org/wiki/Automated_Clearing_House))\
\ implements an HTTP API for creating, parsing and validating Metro2 files. Metro2\
\ is an open-source consumer credit history report for credit report file creation\
\ and validation."
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -29,7 +29,7 @@ paths:
content:
text/plain:
schema:
example: 'health: true'
example: "health: true"
type: string
description: successful operation
summary: health metro2 service
Expand All @@ -56,18 +56,7 @@ paths:
content:
multipart/form-data:
schema:
properties:
format:
default: json
description: print metro2 file type
enum:
- json
- metro2
type: string
file:
description: metro2 file to upload
format: binary
type: string
$ref: '#/components/schemas/print_request'
application/json:
schema:
$ref: '#/components/schemas/File'
Expand All @@ -76,18 +65,32 @@ paths:
content:
text/plain:
schema:
example: '0480HEADER 555555555508202002051019990510199905101999YOUR
BUSINESS NAME HERE LINE ONE OF YOUR ADDRESS LINE
TWO OF YOUR ADDRESS LINE THERE OF YOUR ADDRESS 1234567890 109810101202001112206666666 553723456 M4811222019000000000000002438LOC
00000000000000010062 BBBBBBBBBBBBBBBBBBBBBBBBASXA00000223300000000000000000009202002071920010802200208022002 SMITH-JONES JUNIOR S1593287590318197251755555551 USRMXH+6W
Casper, Wyoming, United States U.S. Postal MI72654 YOJ1
BEAUCHAMP KEVIN S4451128770102202043355523332R J2
BEAUCHAMP KEVIN S4451128770102202043355523332R
US234 HARRISON PLACE SUITE #305 LANSING MI72654 YO K1WETCOSAT
INDUSTRIES LTD. 04K21Purchased From Name K300 Mortgage
Number K4010120202001202020000001234 L11New Consumer Account Number N1Employer
Name First Line of Employer Address Second Line
of Employer Address Employer City MI23456 Occupation 0500TRAILER000000001 000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000000001000000000000000001000000000000000001000000001000000001000000001000000001000000001000000000000000001000000001000000001000000001000000001000000001000000001000000001000000001000000001 '
example: "0480HEADER 555555555508202002051019990510199905101999YOUR\
\ BUSINESS NAME HERE LINE ONE OF YOUR ADDRESS LINE\
\ TWO OF YOUR ADDRESS LINE THERE OF YOUR ADDRESS \
\ 1234567890 \
\ \
\ \
\ \
\ 109810101202001112206666666 \
\ 553723456 M4811222019000000000000002438LOC\
\ 00000000000000010062 BBBBBBBBBBBBBBBBBBBBBBBBASXA00000223300000000000000000009202002071920010802200208022002\
\ SMITH-JONES JUNIOR \
\ S1593287590318197251755555551 USRMXH+6W Casper,\
\ Wyoming, United States U.S. Postal \
\ MI72654 YOJ1 BEAUCHAMP KEVIN \
\ S4451128770102202043355523332R J2 BEAUCHAMP\
\ KEVIN S4451128770102202043355523332R\
\ US234 HARRISON PLACE SUITE #305 \
\ LANSING MI72654 YO K1WETCOSAT INDUSTRIES LTD.\
\ 04K21Purchased From Name K300 \
\ Mortgage Number K4010120202001202020000001234 L11New Consumer\
\ Account Number N1Employer Name \
\ First Line of Employer Address Second Line of Employer\
\ Address Employer City MI23456 Occupation \
\ 0500TRAILER000000001 000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000000001000000000000000001000000000000000001000000001000000001000000001000000001000000001000000000000000001000000001000000001000000001000000001000000001000000001000000001000000001000000001\
\ \
\ "
type: string
application/json:
schema:
Expand All @@ -111,11 +114,7 @@ paths:
content:
multipart/form-data:
schema:
properties:
file:
description: metro2 file to upload
format: binary
type: string
$ref: '#/components/schemas/validator_request'
responses:
"200":
content:
Expand Down Expand Up @@ -162,31 +161,7 @@ paths:
content:
multipart/form-data:
schema:
properties:
format:
default: json
description: format of metro file
enum:
- json
- metro2
type: string
type:
description: metro file type
enum:
- character
- packed
type: string
generate:
default: false
description: generate new trailer record
type: boolean
newline:
description: has new line
type: boolean
file:
description: metro2 file to upload
format: binary
type: string
$ref: '#/components/schemas/convert_request'
application/json:
schema:
$ref: '#/components/schemas/File'
Expand All @@ -196,6 +171,44 @@ paths:
application/octet-stream:
schema:
description: new metro2 file
example: !!binary |-
MDQ4MEhFQURFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDU1NTU1NTU1NTUwODIwMjAwMjA1
MTAxOTk5MDUxMDE5OTkwNTEwMTk5OVlPVVIgQlVTSU5FU1MgTkFNRSBIRVJFICAgICAgICAgICAg
ICAgICBMSU5FIE9ORSBPRiBZT1VSIEFERFJFU1MgTElORSBUV08gT0YgWU9VUiBBRERSRVNTIExJ
TkUgVEhFUkUgT0YgWU9VUiBBRERSRVNTICAgICAgICAgICAgICAgICAgICAxMjM0NTY3ODkwICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgMTA5ODEwMTAxMjAyMDAxMTEyMjA2NjY2NjY2ICAgICAg
ICAgICAgICAgNTUzNzIzNDU2ICAgICAgICAgICAgICAgICAgICAgTTQ4MTEyMjIwMTkwMDAwMDAw
MDAwMDAwMDI0MzhMT0MgMDAwMDAwMDAwMDAwMDAwMTAwNjIgQkJCQkJCQkJCQkJCQkJCQkJCQkJC
QkJCQVNYQTAwMDAwMjIzMzAwMDAwMDAwMDAwMDAwMDAwMDA5MjAyMDAyMDcxOTIwMDEwODAyMjAw
MjA4MDIyMDAyICAgICAgICAgICAgICAgICAgU01JVEgtSk9ORVMgICAgICAgICAgICAgIEpVTklP
UiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTMTU5MzI4NzU5MDMxODE5NzI1MTc1
NTU1NTU1MSAgVVNSTVhIKzZXIENhc3BlciwgV3lvbWluZywgICAgICAgIFVuaXRlZCBTdGF0ZXMg
ICAgICAgICAgICAgICAgICAgVS5TLiBQb3N0YWwgICAgICAgICBNSTcyNjU0ICAgIFlPSjEgQkVB
VUNIQU1QICAgICAgICAgICAgICAgIEtFVklOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBTNDQ1MTEyODc3MDEwMjIwMjA0MzM1NTUyMzMzMlIgIEoyIEJFQVVDSEFNUCAgICAgICAg
ICAgICAgICBLRVZJTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUzQ0NTExMjg3
NzAxMDIyMDIwNDMzNTU1MjMzMzJSIFVTMjM0IEhBUlJJU09OIFBMQUNFICAgICAgICAgICAgICBT
VUlURSAjMzA1ICAgICAgICAgICAgICAgICAgICAgIExBTlNJTkcgICAgICAgICAgICAgTUk3MjY1
NCAgICBZTyAgSzFXRVRDT1NBVCBJTkRVU1RSSUVTIExURC4gICAgICAwNEsyMVB1cmNoYXNlZCBG
cm9tIE5hbWUgICAgICAgICAgICBLMzAwICAgICAgICAgICAgICAgICAgTW9ydGdhZ2UgTnVtYmVy
ICAgSzQwMTAxMjAyMDIwMDEyMDIwMjAwMDAwMDEyMzQgTDExTmV3IENvbnN1bWVyIEFjY291bnQg
TnVtYmVyICAgICAgICAgICAgICAgICAgICAgICAgTjFFbXBsb3llciBOYW1lICAgICAgICAgICAg
ICAgICBGaXJzdCBMaW5lIG9mIEVtcGxveWVyIEFkZHJlc3MgIFNlY29uZCBMaW5lIG9mIEVtcGxv
eWVyIEFkZHJlc3MgRW1wbG95ZXIgQ2l0eSAgICAgICBNSTIzNDU2ICAgIE9jY3VwYXRpb24gICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDUwMFRSQUlMRVIwMDAwMDAw
MDEgICAgICAgICAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEwMDAwMDAwMDAw
MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw
MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw
MDAwMDAwMDAwMDAwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDAwMDAwMDAwMDEw
MDAwMDAwMDAwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAw
MDAwMDEwMDAwMDAwMDAwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAw
MDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEwMDAwMDAwMDEgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICA=
format: binary
type: string
description: successful operation
Expand Down Expand Up @@ -918,3 +931,48 @@ components:
required:
- employerName
- segmentIdentifier
print_request:
properties:
format:
default: json
description: print metro2 file type
enum:
- json
- metro2
type: string
file:
description: metro2 file to upload
format: binary
type: string
validator_request:
properties:
file:
description: metro2 file to upload
format: binary
type: string
convert_request:
properties:
format:
default: json
description: format of metro file
enum:
- json
- metro2
type: string
type:
description: metro file type
enum:
- character
- packed
type: string
generate:
default: false
description: generate new trailer record
type: boolean
newline:
description: has new line
type: boolean
file:
description: metro2 file to upload
format: binary
type: string
Loading

0 comments on commit a0b0ee6

Please sign in to comment.