Skip to content

Commit

Permalink
Add GetCurrentCustomer api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanbenes committed Apr 23, 2021
1 parent b3705bb commit 0b887b0
Show file tree
Hide file tree
Showing 2 changed files with 705 additions and 536 deletions.
153 changes: 142 additions & 11 deletions ClientApp/nopapi.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,106 @@
"Customers"
],
"operationId": "CreateCustomer",
"requestBody": {
"content": {
"application/json-patch+json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/CustomersRootObject"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomersRootObject"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/CustomersRootObject"
}
}
}
},
"422": {
"description": "Client Error",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ErrorsRootObject"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorsRootObject"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ErrorsRootObject"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
},
"application/json": {
"schema": {
"type": "string"
}
},
"text/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/customers/me": {
"get": {
"tags": [
"Customers"
],
"operationId": "GetCurrentCustomer",
"parameters": [
{
"name": "customerDelta",
"name": "fields",
"in": "query",
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
"type": "string"
}
}
],
Expand All @@ -749,8 +843,8 @@
}
}
},
"422": {
"description": "Client Error",
"400": {
"description": "Bad Request",
"content": {
"text/plain": {
"schema": {
Expand All @@ -769,6 +863,26 @@
}
}
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
},
"application/json": {
"schema": {
"type": "string"
}
},
"text/json": {
"schema": {
"type": "string"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
Expand Down Expand Up @@ -906,13 +1020,6 @@
],
"operationId": "UpdateCustomer",
"parameters": [
{
"name": "customerDelta",
"in": "query",
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
{
"name": "id",
"in": "path",
Expand All @@ -922,6 +1029,30 @@
}
}
],
"requestBody": {
"content": {
"application/json-patch+json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/CustomerDtoDelta"
}
}
}
},
"responses": {
"200": {
"description": "Success",
Expand Down
Loading

0 comments on commit 0b887b0

Please sign in to comment.