Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
c94ea3b
initial commit with definition of merchant wallets endpoints, schemas…
MoSwilam Oct 5, 2022
e0d92fa
Merchant Wallets Endpoints done - revision required
moswilamdev Oct 6, 2022
8d8ea2c
callback addresses api initiated
moswilamdev Oct 11, 2022
8621ca3
create-buy-btn
moswilamdev Oct 21, 2022
30e9ea6
schema validated using the test script
moswilamdev Nov 21, 2022
4574671
create invoice request and response schemas
moswilamdev Nov 24, 2022
924bd89
remove endpoints that are not part of public api
moswilamdev Nov 27, 2022
5043606
invoices payouts
moswilamdev Nov 29, 2022
6297add
global types - payout currency obj
moswilamdev Nov 30, 2022
57828a3
get callback address deposits
moswilamdev Dec 1, 2022
9edb3b4
clients API
moswilamdev Dec 1, 2022
f1a1fe8
auth code example done
MoSwilam Dec 19, 2022
f926669
add untracked files to git
MoSwilam Dec 20, 2022
2f31469
push untracked files
MoSwilam Dec 21, 2022
d4aaaac
fix file names
MoSwilam Dec 21, 2022
cc9d45a
fix file names
MoSwilam Dec 21, 2022
7c35321
Revert "push untracked files"
MoSwilam Dec 22, 2022
8b06063
add assets and fix file names
MoSwilam Dec 22, 2022
7434598
fix file names
MoSwilam Dec 21, 2022
c048048
fix file names
MoSwilam Dec 21, 2022
1aea0a2
fix add default license
MoSwilam Dec 22, 2022
f691909
Merge branch 'Redocly' of https://github.com/CoinPaymentsNet/CoinPaym…
MoSwilam Dec 22, 2022
a4cf89a
invoice flow description
MoSwilam Dec 22, 2022
b6a9b19
fix invoice description
MoSwilam Dec 22, 2022
c19b0b3
fix invoice description #2
MoSwilam Dec 22, 2022
fe88ce4
add mermaid diagram describing invoice flow
MoSwilam Dec 22, 2022
27c66a1
Coin api - get list of platform supported coins
MoSwilam Jan 25, 2023
b79eedf
add get currency by id
MoSwilam Jan 27, 2023
a1ef074
get latest block number by currency Id
MoSwilam Jan 27, 2023
5798120
get a list of currency conversions
MoSwilam Jan 28, 2023
e6409eb
wallets, webhooks
MoSwilam Apr 17, 2023
1e7dbcd
fix file name
MoSwilam Apr 17, 2023
d6a0330
fix file name
MoSwilam Apr 17, 2023
560097d
create and retrieve wallet addresses
MoSwilam Apr 17, 2023
ff3ba61
fix create wallet response
MoSwilam Apr 18, 2023
a8c1bad
add description to invoice fields
MoSwilam Apr 26, 2023
564a529
invoicePayload
MoSwilam May 1, 2023
3780d27
fix nullable
MoSwilam May 1, 2023
6ecb375
fix types
MoSwilam May 1, 2023
ec6006f
remove default security declaration
MoSwilam May 1, 2023
df65ef4
fix types
MoSwilam May 2, 2023
3715d77
Document send convert request
MoSwilam May 11, 2023
ebcb8a5
fix conversion separate api
MoSwilam May 15, 2023
19b0930
fix webhook res
MoSwilam May 15, 2023
fafde9a
fix webhook res
MoSwilam May 15, 2023
6689e43
fix file names
MoSwilam May 16, 2023
df53ef7
fix ref
MoSwilam May 16, 2023
6636d71
add required fields
MoSwilam May 16, 2023
26e1c9f
Update openapi.yaml
MoSwilam May 16, 2023
7120a08
General fixes
MoSwilam May 19, 2023
4d30bb7
fix spend request and spend confirmation
MoSwilam May 25, 2023
f7dc74d
fix spend and convert requests
MoSwilam May 25, 2023
af82dce
withdrawal and conversion description update
MoSwilam May 25, 2023
d62f060
fix required fields
MoSwilam May 26, 2023
68f1e36
Update send-convert-request.yaml
MoSwilam May 29, 2023
4fe4986
add rates and invoice history
MoSwilam May 29, 2023
8d66753
general fixes
MoSwilam May 30, 2023
ae3cb90
fix indentation
MoSwilam May 30, 2023
061ba55
payouts
MoSwilam Jun 6, 2023
77dab53
payouts done
MoSwilam Jun 13, 2023
326b2d0
fix invoices DTO and wallet response
MoSwilam Jul 4, 2023
dcbe71b
fix casing
MoSwilam Jul 4, 2023
220d55c
fix wallet tx payload
MoSwilam Jul 6, 2023
7054eb3
Improve text
MoSwilam Jul 7, 2023
0863cff
improve invoices, withdrawal and conversion
MoSwilam Jul 7, 2023
f0e17d0
add common errors
MoSwilam Jul 13, 2023
0c34cce
add common errors
MoSwilam Jul 13, 2023
edf5384
fix error in responses
MoSwilam Jul 18, 2023
7d21566
mermaid for withdrawals
MoSwilam Jul 24, 2023
400f70d
improve spend and convert requests documentation
MoSwilam Jul 24, 2023
a4fdcb2
improve list of wallets API docs
MoSwilam Jul 24, 2023
61b1664
fix flowchart of withdrawal and improve text style
MoSwilam Jul 28, 2023
0ea54e3
fix vaulting description
MoSwilam Jul 28, 2023
8ced673
fixes and improvements
MoSwilam Aug 1, 2023
ff77aac
fix typo
MoSwilam Aug 3, 2023
00d6d15
document rate limits
MoSwilam Aug 3, 2023
55d17a3
add get invoices filters
MoSwilam Aug 3, 2023
7b25d54
fix toAddress mark required
MoSwilam Aug 11, 2023
2039d45
fix description of the notification events
MoSwilam Aug 11, 2023
323c5f0
update withdrawal and conversion documentation
MoSwilam Aug 15, 2023
9020938
change example value of the currency Id
MoSwilam Aug 30, 2023
e4a6a07
improvements
MoSwilam Aug 31, 2023
b0968bb
add description to flowcharts
MoSwilam Aug 31, 2023
57208ed
correct urls to prod ones, fix invoices section description
Mariia-Nosyk Oct 11, 2023
e1846a3
correct sign up url to prod's
Mariia-Nosyk Oct 11, 2023
bd0d137
Merge pull request #25 from CoinPaymentsNet/correct-prod-urls
Mariia-Nosyk Oct 11, 2023
0136847
remove duplicate invoices description
Mariia-Nosyk Oct 14, 2023
d80e832
Merge pull request #26 from CoinPaymentsNet/correct-prod-urls
Mariia-Nosyk Oct 14, 2023
4eb6af3
Update API Docs According Public API (#27)
Mariia-Nosyk Feb 26, 2024
c316f19
nullable property test (#28)
Mariia-Nosyk Mar 5, 2024
0714d42
fix cross-refs (#29)
Mariia-Nosyk Mar 12, 2024
258802e
add buy-now button (#30)
Mariia-Nosyk Mar 26, 2024
bd2a73c
add new fields to webhooks payload (#31)
Mariia-Nosyk Mar 30, 2024
68aa50d
correcting descriptions of certain payload fields (#32)
Mariia-Nosyk Apr 2, 2024
6eac7df
add put endpoints for webhooks (#33)
Mariia-Nosyk Apr 3, 2024
7338b9d
postman authentication (#34)
Mariia-Nosyk Apr 5, 2024
21feb6e
Authorization flow (#35)
Mariia-Nosyk Apr 5, 2024
21ab8d5
get address by id (#36)
Mariia-Nosyk Apr 6, 2024
1062d0a
tuning docs to Postman (#37)
Mariia-Nosyk Apr 11, 2024
06b64d4
Remove admonition (#38)
Mariia-Nosyk Apr 11, 2024
2804b29
fix links (#39)
Mariia-Nosyk Apr 17, 2024
c7dde83
remove currencies capabilities (#40)
Mariia-Nosyk Apr 19, 2024
e4e79c4
withdrawal webhooks, invoice events (#41)
Mariia-Nosyk May 7, 2024
fe2801a
address match coin, correct item attribution for invoices (#42)
Mariia-Nosyk May 17, 2024
503dea3
minor fix
Mariia-Nosyk May 17, 2024
1fc1204
QR code example (#43)
Mariia-Nosyk May 24, 2024
917250d
specific crypto address in the crateInvoice request/response (#44)
Mariia-Nosyk May 29, 2024
74f7e4c
webhooks signature (#45)
Mariia-Nosyk Jun 9, 2024
1a3ba4c
spend req resp code
Mariia-Nosyk Jun 14, 2024
c7c742b
permanent address behavior (#46)
Mariia-Nosyk Jun 18, 2024
2fcb100
fix webhook put API (#47)
Mariia-Nosyk Jun 19, 2024
eead646
payment settings, webhook array (#48)
Mariia-Nosyk Jun 20, 2024
3c370ff
pic
Mariia-Nosyk Jun 24, 2024
f0f6953
verify webhooks signature (#49)
Mariia-Nosyk Jul 1, 2024
ae72364
webhooks description structure, buy-now button values desc, tx types …
Mariia-Nosyk Jul 11, 2024
d091111
invoice state, txs types with webhooks, error codes (#51)
Mariia-Nosyk Jul 29, 2024
d2ffbca
wallets consolidation (#52)
Mariia-Nosyk Aug 6, 2024
781a724
internal spend webhook spendrequestid
Mariia-Nosyk Aug 9, 2024
f8239db
internal spend webhook tx type
Mariia-Nosyk Aug 9, 2024
3598cfe
typo in item field
Mariia-Nosyk Aug 9, 2024
a58e37a
tx type in webhook
Mariia-Nosyk Aug 12, 2024
ec08c5e
wallets api params and webhook fields (#53)
Mariia-Nosyk Aug 13, 2024
5119f64
wallets api currencyId string
Mariia-Nosyk Aug 16, 2024
6dd1a9e
wallets webhook payload, remove nesting for wallet tx (#54)
Mariia-Nosyk Aug 19, 2024
c2cf0bb
pre-auth script update
Mariia-Nosyk Aug 30, 2024
b3f9b40
network fees, updated invoice attributes, free ltct (#55)
Mariia-Nosyk Sep 7, 2024
505cf4d
free ltct pic
Mariia-Nosyk Sep 12, 2024
abf0707
Merge remote-tracking branch 'origin/Redocly' into Redocly
Mariia-Nosyk Sep 12, 2024
6805983
invoices webhooks API renaming, invoice API description structuring, …
Mariia-Nosyk Sep 13, 2024
9f96f7a
invoices webhooks API restructure
Mariia-Nosyk Sep 13, 2024
3ce4bce
get invoice webhooks
Mariia-Nosyk Sep 13, 2024
230b3fa
wallet webhooks auth (#56)
Mariia-Nosyk Sep 13, 2024
87e8087
webhook example CP fee
Mariia-Nosyk Sep 13, 2024
832f89b
hide shopping cart flag (#57)
Mariia-Nosyk Sep 24, 2024
81aa443
extend wallet webhook notifications (#58)
Mariia-Nosyk Sep 24, 2024
e94db66
extended wallet webhook notification example
Mariia-Nosyk Sep 24, 2024
aa3ad2c
consolidation param and spend request example (#59)
Mariia-Nosyk Sep 26, 2024
b548fc3
link, request
Mariia-Nosyk Sep 27, 2024
5d52e6e
conversion limits (#60)
Mariia-Nosyk Oct 8, 2024
6044b78
get invoices and inv by id v1 (#61)
Mariia-Nosyk Oct 24, 2024
b4f9854
v1 version added to files paths (#62)
Mariia-Nosyk Oct 29, 2024
8c6767f
test v2
Mariia-Nosyk Oct 29, 2024
7985f8e
test v2.1
Mariia-Nosyk Oct 29, 2024
fc9d497
test v2.2
Mariia-Nosyk Oct 29, 2024
6b11dfe
currencies, fees, rates v2
Mariia-Nosyk Nov 1, 2024
9a7b383
fix path for currency limits
Mariia-Nosyk Nov 1, 2024
03d61cf
TOC fix
Mariia-Nosyk Nov 1, 2024
fc3160a
TOC fix2
Mariia-Nosyk Nov 1, 2024
f2b4e69
invoices API v2 (#63)
Mariia-Nosyk Nov 5, 2024
a99e85b
wallets API v2 (#64)
Mariia-Nosyk Nov 7, 2024
44eddf5
extension test
Mariia-Nosyk Nov 7, 2024
ca37a8e
extension test 2
Mariia-Nosyk Nov 7, 2024
9e810dd
extension test 3
Mariia-Nosyk Nov 7, 2024
5664a9d
extension test 4
Mariia-Nosyk Nov 7, 2024
c778bc3
extension test 5
Mariia-Nosyk Nov 7, 2024
74ac2ce
extension Currencies API
Mariia-Nosyk Nov 7, 2024
7e27b0e
extension Currencies API 2.0
Mariia-Nosyk Nov 7, 2024
3b87057
extension Currencies API 3.0
Mariia-Nosyk Nov 7, 2024
b5ce0e8
extension Rates and Fees API
Mariia-Nosyk Nov 8, 2024
1046e41
remove extra version
Mariia-Nosyk Nov 8, 2024
c0ac1ae
extension invoice webhooks API
Mariia-Nosyk Nov 8, 2024
3207322
extension invoice webhooks API 2.0
Mariia-Nosyk Nov 8, 2024
ad57465
extension invoices API
Mariia-Nosyk Nov 8, 2024
72a3efb
extension Wallets API
Mariia-Nosyk Nov 8, 2024
2311d25
extension Wallets API 2.0
Mariia-Nosyk Nov 8, 2024
05e2f35
reorganize API sections (#65)
Mariia-Nosyk Nov 21, 2024
060da6e
acl model (#66)
Mariia-Nosyk Nov 23, 2024
63facde
whitelabel to checkout app (#67)
Mariia-Nosyk Nov 25, 2024
a8296b4
add pic
Mariia-Nosyk Nov 26, 2024
962191b
Merge remote-tracking branch 'origin/Redocly' into Redocly
Mariia-Nosyk Nov 26, 2024
777fa70
notif payload, tx statuses, info desc update with cross-refs
Mariia-Nosyk Nov 26, 2024
370258a
webhook terminology
Mariia-Nosyk Nov 26, 2024
e9f88b8
webhook files rename
Mariia-Nosyk Nov 26, 2024
3e08bc8
webhook sidebar menu rename
Mariia-Nosyk Nov 26, 2024
4be59ca
info update
Mariia-Nosyk Nov 27, 2024
8c3218d
cross-refs fix
Mariia-Nosyk Nov 27, 2024
571696c
invoice webhooks refs
Mariia-Nosyk Nov 29, 2024
82b6094
invoice webhooks refs 2
Mariia-Nosyk Nov 29, 2024
250b9ac
wallets refs
Mariia-Nosyk Nov 29, 2024
27586d3
wallets refs 2
Mariia-Nosyk Nov 29, 2024
036af9a
wallets refs 3
Mariia-Nosyk Nov 29, 2024
ef0c4fa
wallets refs 4
Mariia-Nosyk Nov 29, 2024
4bb338e
currencies api fixes, move wallets api, add note on confirmations
Mariia-Nosyk Dec 2, 2024
5635d90
authorization file v2
Mariia-Nosyk Dec 2, 2024
25e82a4
auth file v1 refs
Mariia-Nosyk Dec 2, 2024
549af85
auth file v1 refs 2
Mariia-Nosyk Dec 3, 2024
5f9378e
update emails, currencies and test links to real ones for whitelabeling
Mariia-Nosyk Dec 3, 2024
694c04b
logo href test
Mariia-Nosyk Dec 3, 2024
eb786a4
logo 2 href test
Mariia-Nosyk Dec 3, 2024
96995fe
pics links and eth id
Mariia-Nosyk Dec 4, 2024
11605e2
pics links 2
Mariia-Nosyk Dec 4, 2024
10b3883
remove href
Mariia-Nosyk Dec 6, 2024
98a4a50
remove nullable
Mariia-Nosyk Dec 6, 2024
f6bfca9
guid for button
Mariia-Nosyk Dec 6, 2024
f226190
guid for button 2
Mariia-Nosyk Dec 6, 2024
1592d4d
fix pics
Mariia-Nosyk Dec 7, 2024
7b860b1
code examples (#68)
Mariia-Nosyk Dec 10, 2024
e91fb9f
payout overrides
Mariia-Nosyk Jan 2, 2025
f6ace95
payout overrides fix
Mariia-Nosyk Jan 2, 2025
3bff100
remove obsolete param for get invoice
Mariia-Nosyk Jan 15, 2025
0f0dc1c
disclaimer for legacy api docs
Mariia-Nosyk Jan 22, 2025
8e27bc0
disclaimer for legacy api docs v2
Mariia-Nosyk Jan 23, 2025
118f9bd
webhooks disclaimer, invoice required fields
Mariia-Nosyk Feb 11, 2025
e658eeb
fix attribute type
Mariia-Nosyk Feb 13, 2025
f39f8ae
fix fromAddress description
Mariia-Nosyk Feb 13, 2025
af56b34
paging params for wallet tx list
Mariia-Nosyk Feb 13, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ _site/
_pdf
.DS_Store
.idea
node_modules
.env
28 changes: 28 additions & 0 deletions .redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://redocly.com/docs/cli/configuration/ for more information.
apis:
sample@v1:
root: ./openapi/openapi.yaml
sample@v2:
root: ./openapi/openapi-2.yaml
versionPicker:
showForUnversioned: true
lint:
extends:
- recommended
rules:
no-unused-components: error
pagination: none
features.openapi:
showConsole: true
htmlTemplate: ./docs/index.html
theme:
colors:
primary:
main: "#32329f"
generateCodeSamples:
languages: # Array of language config objects; indicates in which languages to generate code samples.
- lang: curl
- lang: Node.js
- lang: JavaScript
- lang: PHP
- lang: Python
132 changes: 0 additions & 132 deletions CoinIntegration/index.html

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Ivan Goncharov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
258 changes: 258 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
# OpenAPI Definition Starter

## How to use this starter

![Click use template button](https://user-images.githubusercontent.com/3975738/92927304-12e35d80-f446-11ea-9bd3-a0f8a69792d0.png)

## Working on your OpenAPI Definition

### Install

1. Install [Node JS](https://nodejs.org/).
2. Clone this repo and run `npm install` in the repo root.

### Usage

#### `npm start`
Starts the reference docs preview server.

#### `npm run build`
Bundles the definition to the dist folder.

#### `npm test`
Validates the definition.

## Contribution Guide

Below is a sample contribution guide. The tools
in the repository don't restrict you to any
specific structure. Adjust the contribution guide
to match your own structure. However, if you
don't have a structure in mind, this is a
good place to start.

Update this contribution guide if you
adjust the file/folder organization.

The `.redocly.yaml` controls settings for various
tools including the lint tool and the reference
docs engine. Open it to find examples and
[read the docs](https://redocly.com/docs/cli/configuration/)
for more information.


### Schemas

#### Adding Schemas

1. Navigate to the `openapi/components/schemas` folder.
2. Add a file named as you wish to name the schema.
3. Define the schema.
4. Refer to the schema using the `$ref` (see example below).

##### Example Schema
This is a very simple schema example:
```yaml
type: string
description: The resource ID. Defaults to UUID v4
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
```
This is a more complex schema example:
```yaml
type: object
properties:
id:
description: The customer identifier string
readOnly: true
allOf:
- $ref: ./ResourceId.yaml
websiteId:
description: The website's ID
allOf:
- $ref: ./ResourceId.yaml
paymentToken:
type: string
writeOnly: true
description: |
A write-only payment token; if supplied, it will be converted into a
payment instrument and be set as the `defaultPaymentInstrument`. The
value of this property will override the `defaultPaymentInstrument`
in the case that both are supplied. The token may only be used once
before it is expired.
defaultPaymentInstrument:
$ref: ./PaymentInstrument.yaml
createdTime:
description: The customer created time
allOf:
- $ref: ./ServerTimestamp.yaml
updatedTime:
description: The customer updated time
allOf:
- $ref: ./ServerTimestamp.yaml
tags:
description: A list of customer's tags
readOnly: true
type: array
items:
$ref: ./Tags/Tag.yaml
revision:
description: >
The number of times the customer data has been modified.

The revision is useful when analyzing webhook data to determine if the
change takes precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: The links related to resource
readOnly: true
minItems: 3
items:
anyOf:
- $ref: ./Links/SelfLink.yaml
- $ref: ./Links/NotesLink.yaml
- $ref: ./Links/DefaultPaymentInstrumentLink.yaml
- $ref: ./Links/LeadSourceLink.yaml
- $ref: ./Links/WebsiteLink.yaml
_embedded:
type: array
description: >-
Any embedded objects available that are requested by the `expand`
querystring parameter.
readOnly: true
minItems: 1
items:
anyOf:
- $ref: ./Embeds/LeadSourceEmbed.yaml

```

If you have an JSON example, you can convert it to JSON schema using Redocly's [JSON to JSON schema tool](https://redocly.com/tools/json-to-json-schema/).

##### Using the `$ref`

Notice in the complex example above the schema definition itself has `$ref` links to other schemas defined.

Here is a small excerpt with an example:

```yaml
defaultPaymentInstrument:
$ref: ./PaymentInstrument.yaml
```

The value of the `$ref` is the path to the other schema definition.

You may use `$ref`s to compose schema from other existing schema to avoid duplication.

You will use `$ref`s to reference schema from your path definitions.

#### Editing Schemas

1. Navigate to the `openapi/components/schemas` folder.
2. Open the file you wish to edit.
3. Edit.

### Paths

#### Adding a Path

1. Navigate to the `openapi/paths` folder.
2. Add a new YAML file named like your URL endpoint except replacing `/` with `_` (or whichever character you prefer) and putting path parameters into curly braces like `{example}`.
3. Add the path and a ref to it inside of your `openapi.yaml` file inside of the `openapi` folder.

Example addition to the `openapi.yaml` file:
```yaml
'/customers/{id}':
$ref: './paths/customers_{id}.yaml'
```

Here is an example of a YAML file named `customers_{id}.yaml` in the `paths` folder:

```yaml
get:
tags:
- Customers
summary: Retrieve a list of customers
operationId: GetCustomerCollection
description: |
You can have a markdown description here.
parameters:
- $ref: ../components/parameters/collectionLimit.yaml
- $ref: ../components/parameters/collectionOffset.yaml
- $ref: ../components/parameters/collectionFilter.yaml
- $ref: ../components/parameters/collectionQuery.yaml
- $ref: ../components/parameters/collectionExpand.yaml
- $ref: ../components/parameters/collectionFields.yaml
responses:
'200':
description: A list of Customers was retrieved successfully
headers:
Rate-Limit-Limit:
$ref: ../components/headers/Rate-Limit-Limit.yaml
Rate-Limit-Remaining:
$ref: ../components/headers/Rate-Limit-Remaining.yaml
Rate-Limit-Reset:
$ref: ../components/headers/Rate-Limit-Reset.yaml
Pagination-Total:
$ref: ../components/headers/Pagination-Total.yaml
Pagination-Limit:
$ref: ../components/headers/Pagination-Limit.yaml
Pagination-Offset:
$ref: ../components/headers/Pagination-Offset.yaml
content:
application/json:
schema:
type: array
items:
$ref: ../components/schemas/Customer.yaml
text/csv:
schema:
type: array
items:
$ref: ../components/schemas/Customer.yaml
'401':
$ref: ../components/responses/AccessForbidden.yaml
x-code-samples:
- lang: PHP
source:
$ref: ../code_samples/PHP/customers/get.php
post:
tags:
- Customers
summary: Create a customer (without an ID)
operationId: PostCustomer
description: Another markdown description here.
requestBody:
$ref: ../components/requestBodies/Customer.yaml
responses:
'201':
$ref: ../components/responses/Customer.yaml
'401':
$ref: ../components/responses/AccessForbidden.yaml
'409':
$ref: ../components/responses/Conflict.yaml
'422':
$ref: ../components/responses/InvalidDataError.yaml
x-code-samples:
- lang: PHP
source:
$ref: ../code_samples/PHP/customers/post.php
```

You'll see extensive usage of `$ref`s in this example to different types of components including schemas.

You'll also notice `$ref`s to code samples.

### Code samples

Automated code sample generations is enabled in the Redocly configuration file. Add manual code samples by the following process:

1. Navigate to the `openapi/code_samples` folder.
2. Navigate to the `<language>` (e.g. PHP) sub-folder.
3. Navigate to the `path` folder, and add ref to the code sample.

You can add languages by adding new folders at the appropriate path level.

More details inside the `code_samples` folder README.
64 changes: 0 additions & 64 deletions add-API-section.js

This file was deleted.

Loading