Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,13 @@
}
}
},
"/{tennantId}/orders/Delete/{id}": {
"/{tennantId}/orders/DeleteById": {
"delete": {
"tags": [
"Orders"
],
"summary": "Delete by Id",
"parameters": [
{
"name": "Id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "tennantId",
"in": "path",
Expand All @@ -158,6 +149,27 @@
}
}
],
"requestBody": {
"description": "deleting Id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Order"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Order"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/Order"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Deleted",
Expand Down Expand Up @@ -195,18 +207,6 @@
],
"summary": "Delete by Id List",
"parameters": [
{
"name": "id",
"in": "path",
"description": "deleting Id",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
}
}
},
{
"name": "tennantId",
"in": "path",
Expand All @@ -216,6 +216,36 @@
}
}
],
"requestBody": {
"description": "deleting Ids",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
}
}
},
"application/*+json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Order"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Deleted",
Expand Down Expand Up @@ -374,22 +404,13 @@
}
}
},
"/{tennantId}/products/Delete/{id}": {
"/{tennantId}/products/DeleteById": {
"delete": {
"tags": [
"Products"
],
"summary": "Delete by Id",
"parameters": [
{
"name": "Id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "tennantId",
"in": "path",
Expand All @@ -399,6 +420,27 @@
}
}
],
"requestBody": {
"description": "deleting Id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Product"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Product"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/Product"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Deleted",
Expand Down Expand Up @@ -436,18 +478,6 @@
],
"summary": "Delete by Id List",
"parameters": [
{
"name": "id",
"in": "path",
"description": "deleting Id",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
{
"name": "tennantId",
"in": "path",
Expand All @@ -457,6 +487,36 @@
}
}
],
"requestBody": {
"description": "deleting Ids",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"application/*+json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Deleted",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,36 @@ public int Create([FromBody, Required] TResource resource, CancellationToken can
/// <returns></returns>
/// <response code="200">Deleted</response>
/// <response code="404">Failed</response>
[HttpDelete($"{nameof(Delete)}/{{{nameof(id)}}}")]
public virtual int Delete([Required, FromRoute] TResource id, CancellationToken cancellationToken)
[HttpDelete($"{nameof(Delete)}ById")]
public virtual int Delete([Required, FromBody] TResource id, CancellationToken cancellationToken)
{
return 1;
}

/// <summary>
/// Delete by Id List
/// </summary>
/// <param name="id">deleting Id</param>
/// <param name="ids">deleting Ids</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
/// <response code="200">Deleted</response>
/// <response code="404">Failed</response>
[HttpDelete($"{nameof(Delete)}/List")]
public virtual int Delete([Required, FromRoute] List<TResource> id, CancellationToken cancellationToken)
public virtual int Delete([Required, FromBody] List<TResource> ids, CancellationToken cancellationToken)
{
return 1;
}

/// <summary>
/// Delete by Ids
/// </summary>
/// <param name="ids">deleting Ids</param>
/// <param name="resources">deleting Ids</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
/// <response code="200">Deleted</response>
/// <response code="404">Failed</response>
[HttpDelete("")]
public virtual int Delete([Required, FromBody] TResource[] ids, CancellationToken cancellationToken)
public virtual int Delete([Required, FromBody] TResource[] resources, CancellationToken cancellationToken)
{
return 1;
}
Expand Down