Skip to content

Commit 71224a0

Browse files
committed
Minor update
1 parent fc9aa2c commit 71224a0

19 files changed

+680
-188
lines changed

.openapi-generator/FILES

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
.gitignore
2-
.openapi-generator-ignore
32
.travis.yml
43
README.md
54
api/openapi.yaml
65
api_customer.go
76
client.go
87
configuration.go
98
docs/CustomerAPI.md
9+
docs/CustomerGet200Response.md
1010
docs/CustomerPost200Response.md
1111
docs/CustomerPost409Response.md
1212
docs/CustomerPostRequest.md
13-
docs/GetResultsGet200Response.md
1413
git_push.sh
1514
go.mod
1615
go.sum
16+
model__customer_get_200_response.go
1717
model__customer_post_200_response.go
1818
model__customer_post_409_response.go
1919
model__customer_post_request.go
20-
model__get_results_get_200_response.go
2120
response.go
22-
test/api_customer_test.go
2321
utils.go

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Go API client for openapi
22

3-
API's cerate customer in the database
3+
APIs to manage customers in the database.
44

55
## Overview
66
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.
@@ -22,7 +22,7 @@ go get golang.org/x/net/context
2222
Put the package under your project folder and add the following in import:
2323

2424
```go
25-
import openapi "github.com/Password-Management/API-Client"
25+
import openapi "github.com/GIT_USER_ID/GIT_REPO_ID"
2626
```
2727

2828
To use a proxy, set the environment variable `HTTP_PROXY`:
@@ -78,16 +78,16 @@ All URIs are relative to *http://localhost*
7878

7979
Class | Method | HTTP request | Description
8080
------------ | ------------- | ------------- | -------------
81-
*CustomerAPI* | [**CustomerPost**](docs/CustomerAPI.md#customerpost) | **Post** /customer | Create a new custmer in the database
82-
*CustomerAPI* | [**GetResultsGet**](docs/CustomerAPI.md#getresultsget) | **Get** /get-results | API to get counts of votes/ Winner of the election
81+
*CustomerAPI* | [**CustomerGet**](docs/CustomerAPI.md#customerget) | **Get** /customer | Get customer details using the MasterId
82+
*CustomerAPI* | [**CustomerPost**](docs/CustomerAPI.md#customerpost) | **Post** /customer | Create a new customer in the database
8383

8484

8585
## Documentation For Models
8686

87+
- [CustomerGet200Response](docs/CustomerGet200Response.md)
8788
- [CustomerPost200Response](docs/CustomerPost200Response.md)
8889
- [CustomerPost409Response](docs/CustomerPost409Response.md)
8990
- [CustomerPostRequest](docs/CustomerPostRequest.md)
90-
- [GetResultsGet200Response](docs/GetResultsGet200Response.md)
9191

9292

9393
## Documentation For Authorization

api/openapi.yaml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,36 @@ info:
33
contact:
44
email: sharmavivek1709@gmail.com
55
name: Vivek Sharma
6-
description: API's cerate customer in the database
6+
description: APIs to manage customers in the database.
77
title: Customer Creation API
88
version: 1.0.0
99
servers:
1010
- url: /
1111
tags:
12-
- description: Operations related to Customer
12+
- description: Operations related to customers.
1313
name: Customer
1414
paths:
1515
/customer:
16+
get:
17+
parameters:
18+
- description: The Master ID of the customer
19+
explode: true
20+
in: query
21+
name: masterId
22+
required: true
23+
schema:
24+
type: string
25+
style: form
26+
responses:
27+
"200":
28+
content:
29+
application/json:
30+
schema:
31+
$ref: '#/components/schemas/_customer_get_200_response'
32+
description: Successful retrieval
33+
summary: Get customer details using the MasterId
34+
tags:
35+
- Customer
1636
post:
1737
requestBody:
1838
content:
@@ -25,80 +45,59 @@ paths:
2545
platform: Linux
2646
schema:
2747
$ref: '#/components/schemas/_customer_post_request'
28-
description: User login credentials
48+
description: Customer details
2949
required: true
3050
responses:
3151
"200":
3252
content:
3353
application/json:
3454
schema:
3555
$ref: '#/components/schemas/_customer_post_200_response'
36-
description: Successful registeration
56+
description: Successful registration
3757
"409":
3858
content:
3959
application/json:
4060
schema:
4161
$ref: '#/components/schemas/_customer_post_409_response'
42-
description: CONFLICT (User already exists)
43-
summary: Create a new custmer in the database
44-
tags:
45-
- Customer
46-
/get-results:
47-
get:
48-
parameters:
49-
- description: The search keyword
50-
explode: true
51-
in: query
52-
name: masterId
53-
required: true
54-
schema:
55-
type: string
56-
style: form
57-
responses:
58-
"200":
59-
content:
60-
application/json:
61-
schema:
62-
$ref: '#/components/schemas/_get_results_get_200_response'
63-
description: Success
64-
summary: API to get counts of votes/ Winner of the election
62+
description: Conflict - User already exists
63+
summary: Create a new customer in the database
6564
tags:
6665
- Customer
6766
components:
6867
schemas:
6968
_customer_post_200_response:
7069
example:
71-
message: Customer added successfully with email user@example.com
70+
message: Customer added successfully with email vivek@gmail.com
7271
properties:
7372
message:
74-
example: Customer added successfully with email user@example.com
73+
example: Customer added successfully with email vivek@gmail.com
7574
type: string
7675
type: object
7776
_customer_post_409_response:
7877
example:
79-
token: User already exists
78+
message: User already exists
8079
properties:
81-
token:
80+
message:
8281
example: User already exists
8382
type: string
8483
type: object
85-
_get_results_get_200_response:
84+
_customer_get_200_response:
8685
example:
8786
master_id: cd95d3a3-0ffb-4e24-9db9-4d5df3bb228d
8887
name: vviveksharma
89-
plan: RSA
88+
plan: Pro Plan
89+
email: vivek@gmail.com
9090
platform: Linux
91-
emai: vivek@gmail.com
9291
algorithm: RSA
9392
properties:
94-
emai:
93+
email:
9594
example: vivek@gmail.com
9695
type: string
9796
name:
9897
example: vviveksharma
9998
type: string
10099
plan:
101-
example: RSA
100+
example: Pro Plan
102101
type: string
103102
algorithm:
104103
example: RSA
@@ -113,9 +112,9 @@ components:
113112
_customer_post_request:
114113
properties:
115114
email:
115+
format: email
116116
type: string
117117
name:
118-
format: email
119118
type: string
120119
plan:
121120
type: string

0 commit comments

Comments
 (0)