|
2807 | 2807 | } |
2808 | 2808 | } |
2809 | 2809 | }, |
| 2810 | + "/v2": { |
| 2811 | + "get": { |
| 2812 | + "description": "Returns general information about the v2 API", |
| 2813 | + "tags": [ |
| 2814 | + "v2" |
| 2815 | + ], |
| 2816 | + "summary": "v2 API", |
| 2817 | + "responses": { |
| 2818 | + "200": { |
| 2819 | + "description": "OK", |
| 2820 | + "schema": { |
| 2821 | + "$ref": "#/definitions/router.V2Response" |
| 2822 | + } |
| 2823 | + } |
| 2824 | + } |
| 2825 | + }, |
| 2826 | + "options": { |
| 2827 | + "description": "Returns an empty response with the HTTP Header \"allow\" set to the allowed HTTP verbs", |
| 2828 | + "tags": [ |
| 2829 | + "v2" |
| 2830 | + ], |
| 2831 | + "summary": "Allowed HTTP verbs", |
| 2832 | + "responses": { |
| 2833 | + "204": { |
| 2834 | + "description": "No Content" |
| 2835 | + } |
| 2836 | + } |
| 2837 | + } |
| 2838 | + }, |
| 2839 | + "/v2/transactions": { |
| 2840 | + "post": { |
| 2841 | + "description": "Creates transactions from the list of submitted transaction data. The response code is the highest response code number that a single transaction creation would have caused. If it is not equal to 201, at least one transaction has an error.", |
| 2842 | + "produces": [ |
| 2843 | + "application/json" |
| 2844 | + ], |
| 2845 | + "tags": [ |
| 2846 | + "Transactions" |
| 2847 | + ], |
| 2848 | + "summary": "Create transactions", |
| 2849 | + "parameters": [ |
| 2850 | + { |
| 2851 | + "description": "Transactions", |
| 2852 | + "name": "transactions", |
| 2853 | + "in": "body", |
| 2854 | + "required": true, |
| 2855 | + "schema": { |
| 2856 | + "type": "array", |
| 2857 | + "items": { |
| 2858 | + "$ref": "#/definitions/models.TransactionCreate" |
| 2859 | + } |
| 2860 | + } |
| 2861 | + } |
| 2862 | + ], |
| 2863 | + "responses": { |
| 2864 | + "201": { |
| 2865 | + "description": "Created", |
| 2866 | + "schema": { |
| 2867 | + "type": "array", |
| 2868 | + "items": { |
| 2869 | + "$ref": "#/definitions/controllers.ResponseTransactionV2" |
| 2870 | + } |
| 2871 | + } |
| 2872 | + }, |
| 2873 | + "400": { |
| 2874 | + "description": "Bad Request", |
| 2875 | + "schema": { |
| 2876 | + "type": "array", |
| 2877 | + "items": { |
| 2878 | + "$ref": "#/definitions/controllers.ResponseTransactionV2" |
| 2879 | + } |
| 2880 | + } |
| 2881 | + }, |
| 2882 | + "404": { |
| 2883 | + "description": "Not Found" |
| 2884 | + }, |
| 2885 | + "500": { |
| 2886 | + "description": "Internal Server Error", |
| 2887 | + "schema": { |
| 2888 | + "type": "array", |
| 2889 | + "items": { |
| 2890 | + "$ref": "#/definitions/controllers.ResponseTransactionV2" |
| 2891 | + } |
| 2892 | + } |
| 2893 | + } |
| 2894 | + } |
| 2895 | + }, |
| 2896 | + "options": { |
| 2897 | + "description": "Returns an empty response with the HTTP Header \"allow\" set to the allowed HTTP verbs", |
| 2898 | + "tags": [ |
| 2899 | + "Transactions" |
| 2900 | + ], |
| 2901 | + "summary": "Allowed HTTP verbs", |
| 2902 | + "responses": { |
| 2903 | + "204": { |
| 2904 | + "description": "No Content" |
| 2905 | + } |
| 2906 | + } |
| 2907 | + } |
| 2908 | + }, |
2810 | 2909 | "/version": { |
2811 | 2910 | "get": { |
2812 | 2911 | "description": "Returns the software version of the API", |
|
3170 | 3269 | } |
3171 | 3270 | } |
3172 | 3271 | }, |
| 3272 | + "controllers.ResponseTransactionV2": { |
| 3273 | + "type": "object", |
| 3274 | + "properties": { |
| 3275 | + "data": { |
| 3276 | + "description": "This field contains the transaction data", |
| 3277 | + "allOf": [ |
| 3278 | + { |
| 3279 | + "$ref": "#/definitions/models.Transaction" |
| 3280 | + } |
| 3281 | + ] |
| 3282 | + }, |
| 3283 | + "error": { |
| 3284 | + "description": "This field contains a human readable error message", |
| 3285 | + "type": "string", |
| 3286 | + "example": "A human readable error message" |
| 3287 | + } |
| 3288 | + } |
| 3289 | + }, |
3173 | 3290 | "controllers.TransactionListResponse": { |
3174 | 3291 | "type": "object", |
3175 | 3292 | "properties": { |
|
4083 | 4200 | "type": "string", |
4084 | 4201 | "example": "https://example.com/api/v1" |
4085 | 4202 | }, |
| 4203 | + "v2": { |
| 4204 | + "description": "List endpoint for all v2 endpoints", |
| 4205 | + "type": "string", |
| 4206 | + "example": "https://example.com/api/v2" |
| 4207 | + }, |
4086 | 4208 | "version": { |
4087 | 4209 | "description": "Endpoint returning the version of the backend", |
4088 | 4210 | "type": "string", |
|
4156 | 4278 | } |
4157 | 4279 | } |
4158 | 4280 | }, |
| 4281 | + "router.V2Links": { |
| 4282 | + "type": "object", |
| 4283 | + "properties": { |
| 4284 | + "transactions": { |
| 4285 | + "description": "URL of transaction list endpoint", |
| 4286 | + "type": "string", |
| 4287 | + "example": "https://example.com/api/v2/transactions" |
| 4288 | + } |
| 4289 | + } |
| 4290 | + }, |
| 4291 | + "router.V2Response": { |
| 4292 | + "type": "object", |
| 4293 | + "properties": { |
| 4294 | + "links": { |
| 4295 | + "description": "Links for the v2 API", |
| 4296 | + "allOf": [ |
| 4297 | + { |
| 4298 | + "$ref": "#/definitions/router.V2Links" |
| 4299 | + } |
| 4300 | + ] |
| 4301 | + } |
| 4302 | + } |
| 4303 | + }, |
4159 | 4304 | "router.VersionObject": { |
4160 | 4305 | "type": "object", |
4161 | 4306 | "properties": { |
|
0 commit comments