Document miscallenous features in the swagger doc (#2128)

This commit is contained in:
Nicolas Dorier 2020-12-12 14:07:25 +09:00 committed by GitHub
parent 0652e30c30
commit b2855e74ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 2 deletions

View file

@ -247,5 +247,5 @@
<_ContentIncludedByDefault Remove="Views\Components\NotificationsDropdown\Default.cshtml" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties wwwroot_4swagger_4v1_4swagger_1template_1invoices_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1pull-payments_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1serverinfo_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1stores_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1users_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1webhooks_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties wwwroot_4swagger_4v1_4swagger_1template_1invoices_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1misc_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1pull-payments_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1serverinfo_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1stores_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1users_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" wwwroot_4swagger_4v1_4swagger_1template_1webhooks_1json__JsonSchema="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json" /></VisualStudio></ProjectExtensions>
</Project>

View file

@ -675,7 +675,7 @@
"defaultLanguage": {
"type": "string",
"nullable": true,
"description": "The language code (eg. en-US, en, fr-FR...) of the language presented to your customer in the checkout page. BTCPay Server tries to match the best language available. If null or not set, will fallback on the store's default language. Browse the [/misc/lang](/misc/lang) page of your BTCPay Server instance to see the list of supported languages."
"description": "The language code (eg. en-US, en, fr-FR...) of the language presented to your customer in the checkout page. BTCPay Server tries to match the best language available. If null or not set, will fallback on the store's default language. You can see the list of language codes with [this operation](#operation/langCodes)."
}
}
},

View file

@ -0,0 +1,107 @@
{
"paths": {
"/translate": {
"get": {
"tags": [
"Miscalleneous"
],
"summary": "Bitpay translator",
"description": "Bitpay is using a deprecated standard in their invoices that most wallets do not support. Use this tool to transform their invoices to a regular address/amount.",
"responses": {
"200": {
"description": "The page to the Bitpay translator",
"content": {
"text/html": {
"example": "The HTML page of the Bitpay translator tool"
}
}
}
},
"security": []
}
},
"/misc/lang": {
"get": {
"tags": [
"Miscalleneous"
],
"summary": "Language codes",
"description": "The supported language codes",
"operationId": "langCodes",
"responses": {
"200": {
"description": "The supported language codes",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The language code",
"nullable": false
},
"currentLanguage": {
"type": "string",
"description": "The language name",
"nullable": false
}
}
}
}
}
}
}
},
"security": []
}
},
"/i/{invoiceId}": {
"parameters": [
{
"name": "invoiceId",
"in": "path",
"required": true,
"description": "The invoice id",
"schema": {
"type": "string"
}
},
{
"name": "lang",
"in": "query",
"required": false,
"description": "The preferred language of the checkout page. You can see the list of language codes with [this operation](#operation/langCodes).",
"schema": {
"type": "string"
}
}
],
"get": {
"tags": [
"Miscalleneous"
],
"summary": "Invoice checkout",
"description": "View the checkout page of an invoice",
"responses": {
"200": {
"description": "The checkout page",
"content": {
"text/html": {
"example": "The HTML checkout page of the invoice"
}
}
}
},
"security": []
}
}
},
"tags": [
{
"name": "Miscalleneous"
}
]
}