-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PISHPS-282: added openapi v3 documentation for store-api and admin-api (
#760)
- Loading branch information
1 parent
a7fcc78
commit 1b3c4ce
Showing
39 changed files
with
3,636 additions
and
0 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
src/Resources/Schema/admin-api/create-support-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Mollie Support Request API", | ||
"description": "API for submitting support requests to Mollie.", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/api/_action/mollie/support/request": { | ||
"post": { | ||
"summary": "Submit Support Request to Mollie", | ||
"description": "Submits a support request to Mollie.", | ||
"operationId": "submitSupportRequest", | ||
"requestBody": { | ||
"required": true, | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the person submitting the request." | ||
}, | ||
"email": { | ||
"type": "string", | ||
"format": "email", | ||
"description": "The email address of the person submitting the request." | ||
}, | ||
"recipientLocale": { | ||
"type": "string", | ||
"description": "The locale of the recipient for the support request." | ||
}, | ||
"subject": { | ||
"type": "string", | ||
"description": "The subject of the support request." | ||
}, | ||
"message": { | ||
"type": "string", | ||
"description": "The message content of the support request." | ||
} | ||
}, | ||
"required": ["name", "email", "recipientLocale", "subject", "message"], | ||
"example": { | ||
"name": "John Doe", | ||
"email": "[email protected]", | ||
"recipientLocale": "en_US", | ||
"subject": "Issue with payment processing", | ||
"message": "I'm encountering issues with processing payments." | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Support request submitted successfully.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"success": { | ||
"type": "boolean", | ||
"example": true | ||
} | ||
}, | ||
"required": ["success"] | ||
}, | ||
"example": { | ||
"success": true | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal server error.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"success": { | ||
"type": "boolean", | ||
"example": false | ||
}, | ||
"error": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["success", "error"] | ||
}, | ||
"example": { | ||
"success": false, | ||
"error": "Internal server error occurred." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Mollie Order Payment URL API", | ||
"description": "API for generating a payment URL for a Mollie order.", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/api/_action/mollie/order/payment-url": { | ||
"post": { | ||
"summary": "Generate Mollie Order Payment URL", | ||
"description": "Creates a payment URL for a Mollie order.", | ||
"operationId": "paymentUrl", | ||
"responses": { | ||
"201": { | ||
"description": "Payment URL successfully created.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"url": { | ||
"type": "string", | ||
"format": "uri", | ||
"example": "https://example.com" | ||
} | ||
} | ||
}, | ||
"example": { | ||
"url": "https://example.com" | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"description": "Resource not found.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "array", | ||
"items": {} | ||
}, | ||
"example": [] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"EmptyArray": { | ||
"type": "array", | ||
"items": {} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Mollie Payment Method Update API", | ||
"description": "API for updating payment methods for Mollie.", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/api/_action/mollie/payment-method/update-methods": { | ||
"get": { | ||
"summary": "Update Mollie Payment Methods", | ||
"description": "Updates the payment methods for Mollie.", | ||
"operationId": "paymentMethodUpdate", | ||
"responses": { | ||
"200": { | ||
"description": "Payment methods successfully updated.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"success": { | ||
"type": "boolean", | ||
"example": true | ||
} | ||
} | ||
}, | ||
"example": { | ||
"success": true | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal server error.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string", | ||
"example": "Error message" | ||
}, | ||
"success": { | ||
"type": "string", | ||
"example": "false" | ||
} | ||
} | ||
}, | ||
"example": { | ||
"message": "Error message", | ||
"success": "false" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Mollie Refund List API", | ||
"description": "API for listing refund items for a Mollie order.", | ||
"version": "1.0.0" | ||
}, | ||
"paths": { | ||
"/api/_action/mollie/refund/list": { | ||
"post": { | ||
"summary": "List Refund Items for Mollie Order", | ||
"description": "Retrieves a list of refund items for a Mollie order.", | ||
"operationId": "listRefundItems", | ||
"requestBody": { | ||
"required": true, | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"orderId": { | ||
"type": "string", | ||
"format": "uuid", | ||
"description": "The UUID of the order." | ||
} | ||
}, | ||
"required": ["orderId"] | ||
}, | ||
"example": { | ||
"orderId": "123e4567-e89b-12d3-a456-426614174000" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "List of refund items successfully retrieved.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"swLineId": { | ||
"type": "string", | ||
"example": "line_123456" | ||
}, | ||
"swLineVersionId": { | ||
"type": "string", | ||
"example": "version_123456" | ||
}, | ||
"mollieLineId": { | ||
"type": "string", | ||
"example": "mollie_line_123456" | ||
}, | ||
"swReference": { | ||
"type": "string", | ||
"example": "Product ABC" | ||
}, | ||
"quantity": { | ||
"type": "integer", | ||
"example": 1 | ||
}, | ||
"amount": { | ||
"type": "number", | ||
"format": "float", | ||
"example": 50.00 | ||
} | ||
} | ||
} | ||
}, | ||
"example": [ | ||
{ | ||
"swLineId": "line_123456", | ||
"swLineVersionId": "version_123456", | ||
"mollieLineId": "mollie_line_123456", | ||
"swReference": "Product ABC", | ||
"quantity": 1, | ||
"amount": 50.00 | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal server error.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"success": { | ||
"type": "boolean", | ||
"example": false | ||
}, | ||
"errors": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"example": [ | ||
"Error message" | ||
] | ||
} | ||
} | ||
}, | ||
"example": { | ||
"success": false, | ||
"errors": [ | ||
"Error message" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.