Updated with formatting changes
diff --git a/src/api/README.md b/src/api/README.md
index db51bae..c19b3b9 100644
--- a/src/api/README.md
+++ b/src/api/README.md
@@ -15,7 +15,7 @@
closely aligned to conventional REST APIs developed for use in the **web
application development** community. Also, there's currently no support
for XML but instead follows the
-[YANGJSON](https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-json)
+[YANG-JSON](https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-json)
specifications for representing configuration data in JSON.
Below is the complete snippet from [server.coffee](./server.coffee)
@@ -45,9 +45,9 @@
The following section presents various CRUD operations that are
*runtime generated* from the `cord-core` YANG module. These operations
-are essentially interpreted and served **while running** depending on
-the YANG runtime model and the configuration data state at any given
-point in time. Basically, it's performing *adaptive* API routing and
+are essentially interpreted and served **during runtime** depending on
+the YANG runtime model along with the configuration data state at any given
+point in time. Basically, it performs *adaptive* API routing and
rendering.
### View Subscribers
@@ -63,7 +63,7 @@
$ curl localhost:5050/cord:subscriber
```
Response:
-```
+```json
{
"cord-core:subscriber": [
{
@@ -105,7 +105,7 @@
$ curl localhost:5050/cord:subscriber/1
```
Response:
-```
+```json
{
"cord-core:subscriber": {
"id": 1,
@@ -134,7 +134,7 @@
$ curl -X PUT localhost:5050/cord:subscriber/1 -H 'content-type: application/json' -d '{ "id": 10, "status": "suspended", "services": { "cdn": { "enabled": true } } }'
```
Response:
-```
+```json
{
"cord-core:subscriber": {
"id": 10,
@@ -191,7 +191,7 @@
$ curl -X POST localhost:5050/cord:subscriber -H 'content-type: application/json' -d '{ "id": 12, "service-specific-id": 2020, "demo": true }'
```
Response:
-```
+```json
{
"cord-core:subscriber": [
{
@@ -207,7 +207,7 @@
}
]
}
-
+```
The POST operation is only available on YANG `list` schema elements as
well as `rpc` and `action` elements. This operation also accepts
**bulk create** request data by supplying a JSON array.
@@ -223,12 +223,14 @@
Here's a sample list of various URIs for the Subscriber model:
-| GET/POST | /cord:subscriber |
-| GET/PUT/DELETE | /cord:subscriber/:id |
-| GET/PUT | /cord:subscriber/:id/services/cdn |
-| GET/POST | /cord:subscriber/:id/device |
-| GET/PUT/DELETE | /cord:subscriber/:id/device/:mac |
-| GET/PUT | /cord:subscriber/:id/device/:mac/features |
+Methods | Endpoint URI
+--- | ---
+GET/POST | /cord:subscriber
+GET/PUT/DELETE | /cord:subscriber/:id
+GET/PUT | /cord:subscriber/:id/services/cdn
+GET/POST | /cord:subscriber/:id/device
+GET/PUT/DELETE | /cord:subscriber/:id/device/:mac
+GET/PUT | /cord:subscriber/:id/device/:mac/features
### Validations
@@ -249,7 +251,7 @@
$ curl -X PUT localhost:5050/cord:subscriber/10 -H 'content-type: application/json' -d '{ "status": false }'
```
Error Response:
-```
+```json
{
"error": {
"message": "[enumeration] type violation for 'false' on enabled,suspended,delinquent,violation"