Skip to content

Commit

Permalink
fix: Forgot to set git user & repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BehnH committed Feb 3, 2024
1 parent 03b5619 commit 27dcc23
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 58 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

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

9 changes: 9 additions & 0 deletions .idea/loops-api-go.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

5 changes: 0 additions & 5 deletions .openapi-generator/FILES
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 @@ -53,8 +52,4 @@ model_transactional_failure_response.go
model_transactional_request.go
model_transactional_success_response.go
response.go
test/api_contacts_test.go
test/api_custom_fields_test.go
test/api_events_test.go
test/api_transactional_emails_test.go
utils.go
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Go API client for openapi
# Go API client for loops

This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.0.1
- Package version: 1.0.0
- Package version: 1.0.2
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation
Expand All @@ -21,7 +21,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:

```go
import openapi "github.com/GIT_USER_ID/GIT_REPO_ID"
import loops "github.com/behnh/loops-api-go"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand All @@ -36,18 +36,18 @@ Default configuration comes with `Servers` field that contains server objects as

### Select Server Configuration

For using other server than the one defined on index 0 set context value `openapi.ContextServerIndex` of type `int`.
For using other server than the one defined on index 0 set context value `loops.ContextServerIndex` of type `int`.

```go
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), loops.ContextServerIndex, 1)
```

### Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value `openapi.ContextServerVariables` of type `map[string]string`.
Templated server URL is formatted using default variables from configuration or from context value `loops.ContextServerVariables` of type `map[string]string`.

```go
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), loops.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Expand All @@ -58,13 +58,13 @@ Note, enum values are always validated and all unused variables are silently ign

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `openapi.ContextOperationServerIndices` and `openapi.ContextOperationServerVariables` context maps.
Similar rules for overriding default operation server index and variables applies by using `loops.ContextOperationServerIndices` and `loops.ContextOperationServerVariables` context maps.

```go
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), loops.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), loops.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
Expand Down Expand Up @@ -119,7 +119,7 @@ Authentication schemes defined for the API:
Example

```go
auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING")
auth := context.WithValue(context.Background(), loops.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```

Expand Down
2 changes: 1 addition & 1 deletion api_contacts.go

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

2 changes: 1 addition & 1 deletion api_custom_fields.go

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

2 changes: 1 addition & 1 deletion api_events.go

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

2 changes: 1 addition & 1 deletion api_transactional_emails.go

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

2 changes: 1 addition & 1 deletion client.go

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

7 changes: 2 additions & 5 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
package: loops
generate:
client: true
models: true
output: loops.gen.go
packageName: loops
packageVersion: 1.0.2
4 changes: 2 additions & 2 deletions configuration.go

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

8 changes: 4 additions & 4 deletions docs/ContactsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down Expand Up @@ -94,7 +94,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down Expand Up @@ -160,7 +160,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down Expand Up @@ -226,7 +226,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomFieldsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/EventsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/TransactionalEmailsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
openapiclient "github.com/behnh/loops-api-go"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
fi

if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
git_user_id="behnh"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi

if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
git_repo_id="loops-api-go"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/GIT_USER_ID/GIT_REPO_ID
module github.com/behnh/loops-api-go

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion model__contacts_delete_post_500_response.go

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

2 changes: 1 addition & 1 deletion model__transactional_post_400_response.go

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

2 changes: 1 addition & 1 deletion model_contact.go

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

2 changes: 1 addition & 1 deletion model_contact_delete_request.go

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

2 changes: 1 addition & 1 deletion model_contact_delete_response.go

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

2 changes: 1 addition & 1 deletion model_contact_failure_response.go

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

2 changes: 1 addition & 1 deletion model_contact_request.go

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

2 changes: 1 addition & 1 deletion model_contact_success_response.go

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

2 changes: 1 addition & 1 deletion model_custom_field.go

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

2 changes: 1 addition & 1 deletion model_event_failure_response.go

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

2 changes: 1 addition & 1 deletion model_event_request.go

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

2 changes: 1 addition & 1 deletion model_event_success_response.go

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

2 changes: 1 addition & 1 deletion model_transactional_failure2_response.go

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

Loading

0 comments on commit 27dcc23

Please sign in to comment.