-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen_api.php
More file actions
81 lines (74 loc) · 2.1 KB
/
open_api.php
File metadata and controls
81 lines (74 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* @OA\OpenApi(
* @OA\Server(
* url="/api/{version}",
* description="Development server",
* @OA\ServerVariable(
* serverVariable="version",
* default="v1",
* enum={
* "v1"
* },
* ),
* ),
* @OA\Server(
* url="http://develop.sp-ledger.s3.stuffio.com/api/{version}",
* description="Staging server",
* @OA\ServerVariable(
* serverVariable="version",
* default="v1",
* enum={
* "v1"
* },
* ),
* ),
* @OA\Server(
* url="https://sp-ledger.service.consul/api/{version}",
* description="Production server",
* @OA\ServerVariable(
* serverVariable="version",
* default="v1",
* enum={
* "v1"
* },
* ),
* ),
* x={
* "tagGroups": {
* {
* "name": "General",
* "tags": {"Filtering"},
* },
* {
* "name": "Transaction",
* "tags": {"Transaction"},
* },
* }
* },
* @OA\Info(
* version="1.0",
* title="Ledger API",
* x={
* "logo": {
* "url": "/images/brand/Ledger-logo.png",
* "altText": "Ledger",
* },
* },
* description="# Introduction
The API is built on HTTP, our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use Ledger's API.
## JSON Request Bodies
Please make sure to include the HTTP header Content-Type `application/json` with your JSON body, if you decide to use JSON for your POST data instead of URL encoded data.
## API Compatibility
We consider the following changes as 'non-breaking' changes to the API.
- Adding a field to an object
- Introducing a new API endpoint that did not exist before
- Adding a search parameter
However we consider these examples as 'breaking' changes.
- Changing the datatype of a field
- Removing a field from an object
- Changing the semantics of an existing field
- Changing URLs"
* ),
* ),
*/