Skip to content

Commit

Permalink
Reaching baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
ESteanes committed Jul 5, 2024
1 parent b928a66 commit 838799e
Show file tree
Hide file tree
Showing 119 changed files with 1,014 additions and 1,246 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,33 @@ endpoitns to drive the UI
3. Generate the REST client code
```
cd ./datafetcher
openapi-generator-cli generate -i openapi.json -g go -o ./openapiclient --additional-properties packageName=openapiclient --git-user-id esteanes --git-repo-id expense-manager
openapi-generator-cli generate -i openapi.json -g go -o ./openapiclient --additional-properties packageName=openapiclient --git-user-id esteanes --git-repo-id expense-manager/datafetcher/openapiclient
```
Its recommended to have a file called `.openapi-generator-ignore` inside the /openapiclient with the following contents:
```
# OpenAPI Generator Ignore
go.mod
go.sum
LICENSE
```
This will stop the generator from generating those files (which will mess up the Go compilation)


4. Format code
`gofmt -s -w .`
`gofmt -s -w .`

5. Fix up any import changes
`go mod tidy`

6. Build an executable
```
go build -o expense-manager.exe #windows
go build -o expense-manager #linux
```

7. Run the executable
```
.\expense-manager.exe #windows
./expense-manager #linux
```
5 changes: 0 additions & 5 deletions expense-manager/datafetcher/.openapi-generator-ignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
go.mod
go.sum
LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
Expand Down Expand Up @@ -102,8 +101,6 @@ docs/WebhookResourceAttributes.md
docs/WebhookResourceRelationships.md
docs/WebhooksAPI.md
git_push.sh
go.mod
go.sum
model_account_resource.go
model_account_resource_attributes.go
model_account_resource_links.go
Expand Down Expand Up @@ -189,10 +186,4 @@ model_webhook_resource.go
model_webhook_resource_attributes.go
model_webhook_resource_relationships.go
response.go
test/api_accounts_test.go
test/api_categories_test.go
test/api_tags_test.go
test/api_transactions_test.go
test/api_utility_endpoints_test.go
test/api_webhooks_test.go
utils.go
2 changes: 1 addition & 1 deletion expense-manager/datafetcher/openapiclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:

```go
import openapiclient "github.com/esteanes/expense-manager"
import openapiclient "github.com/esteanes/expense-manager/datafetcher/openapiclient"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand Down
61 changes: 30 additions & 31 deletions expense-manager/datafetcher/openapiclient/api_accounts.go

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

Loading

0 comments on commit 838799e

Please sign in to comment.