Skip to content

Commit

Permalink
feat: updated http examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Nov 23, 2023
1 parent 65a6144 commit 22acee1
Show file tree
Hide file tree
Showing 9 changed files with 15,918 additions and 203 deletions.
8 changes: 5 additions & 3 deletions examples/anime-http/client/asyncapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ channels:
messages:
testMessage:
$ref: '#/components/messages/testMessage'
servers:
- $ref: '#/servers/testwebhook'
trendingAnime:
address: '/trendingAnime'
bindings:
Expand All @@ -62,7 +64,7 @@ operations:
messages:
- $ref: '#/components/messages/testMessage'
trendingAnimeListRecieverController:
action: receive
action: send
channel:
$ref: '#/channels/trendingAnime'
messages:
Expand Down Expand Up @@ -131,5 +133,5 @@ components:
availableScopes:
'delete:pets': modify pets in your account
'update:pets': read your pets
x-remoteServers:
- trendingAnime
x-remoteServers:
- trendingAnime
108 changes: 5 additions & 103 deletions examples/anime-http/client/docs/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ This app creates a client that subscribes to the server for getting the top 10 t
* [Servers](#servers)
* [trendingAnime](#trendinganime-server)
* [testwebhook](#testwebhook-server)
* [Operations](#operations)
* [PUB /test](#pub-test-operation)
* [PUB trendingAnime](#pub-trendinganime-operation)
* [SUB trendingAnime](#sub-trendinganime-operation)

## Servers

### `trendingAnime` Server

* URL: `http://localhost:8081`
* URL: `http://localhost:8081/`
* Protocol: `http`


Expand Down Expand Up @@ -63,8 +59,10 @@ This app creates a client that subscribes to the server for getting the top 10 t

| Flow | Auth URL | Token URL | Refresh URL | Scopes |
|---|---|---|---|---|
| Implicit | [https://example.com/api/oauth/dialog](https://example.com/api/oauth/dialog) | - | - | `write:pets`, `read:pets` |
| Authorization Code | [https://example.com/api/oauth/dialog](https://example.com/api/oauth/dialog) | [https://example.com/api/oauth/dialog](https://example.com/api/oauth/dialog) | - | `delete:pets`, `update:pets` |
| Client credentials | - | - | - | - |
| Implicit | [https://example.com/api/oauth/dialog](https://example.com/api/oauth/dialog) | - | - | `write:pets`, `read:pets` |
| Password | - | - | - | - |



Expand All @@ -76,106 +74,10 @@ This app creates a client that subscribes to the server for getting the top 10 t

### `testwebhook` Server

* URL: `ws://localhost:9000`
* URL: `ws://localhost:9000/`
* Protocol: `ws`



## Operations

### PUB `/test` Operation

* Operation ID: `index`

#### `ws` Channel specific information

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| bindingVersion | - | - | `"0.1.0"` | - | - |

#### Message `test`

*ping client*

##### Payload

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| (root) | object | - | - | - | **additional properties are allowed** |

> Examples of payload _(generated)_
```json
{}
```



### PUB `trendingAnime` Operation

* Operation ID: `trendingAnimeListRecieverController`
* Available only on servers: [trendingAnime](#trendinganime-server)

#### `http` Channel specific information

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| type | - | - | `"request"` | - | - |
| method | - | - | `"POST"` | - | - |
| bindingVersion | - | - | `"0.1.0"` | - | - |

#### Message `<anonymous-message-2>`

*Data required to populate trending anime*

##### Payload

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| (root) | object | - | - | - | **additional properties are allowed** |
| name | string | Name of the anime. | - | - | **required** |
| rating | string | Rating of the show. | - | - | **required** |
| genre | string | The genre of anime. | - | - | **required** |
| studio | string | The studio of anime. | - | - | **required** |

> Examples of payload _(generated)_
```json
{
"name": "string",
"rating": "string",
"genre": "string",
"studio": "string"
}
```



### SUB `trendingAnime` Operation

* Available only on servers: [trendingAnime](#trendinganime-server)

#### `http` Channel specific information

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| type | - | - | `"request"` | - | - |
| method | - | - | `"POST"` | - | - |
| bindingVersion | - | - | `"0.1.0"` | - | - |

#### Message `<anonymous-message-3>`

##### Payload

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| (root) | object | - | - | - | **additional properties are allowed** |

> Examples of payload _(generated)_
```json
{}
```



File renamed without changes.
93 changes: 4 additions & 89 deletions examples/anime-http/server/docs/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ This app is a dummy server that would stream the trending/upcoming anime.

* [Servers](#servers)
* [trendingAnimeServer](#trendinganimeserver-server)
* [Operations](#operations)
* [PUB trendingAnime](#pub-trendinganime-operation)
* [SUB trendingAnime](#sub-trendinganime-operation)

## Servers

### `trendingAnimeServer` Server

* URL: `http://localhost:8081`
* URL: `http://localhost:8081/`
* Protocol: `http`


Expand Down Expand Up @@ -65,7 +62,10 @@ This app is a dummy server that would stream the trending/upcoming anime.

| Flow | Auth URL | Token URL | Refresh URL | Scopes |
|---|---|---|---|---|
| Authorization Code | - | - | - | - |
| Client credentials | - | [https://example.com/api/oauth/dialog](https://example.com/api/oauth/dialog) | - | `delete:pets`, `update:pets` |
| Implicit | - | - | - | - |
| Password | - | - | - | - |



Expand All @@ -77,88 +77,3 @@ This app is a dummy server that would stream the trending/upcoming anime.

## Operations

### PUB `trendingAnime` Operation

* Operation ID: `trendingAnimeController`

#### `http` Channel specific information

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| type | - | - | `"request"` | - | - |
| method | - | - | `"POST"` | - | - |
| bindingVersion | - | - | `"0.1.0"` | - | - |
| query | object | - | - | - | **additional properties are allowed** |
| query.name | string | Name of the anime. | - | - | **required** |
| query.rating | string | Rating of the show. | - | - | **required** |
| query.genre | string | The genre of anime. | - | - | **required** |
| query.studio | string | The studio of anime. | - | - | **required** |
| body | object | - | - | - | **additional properties are allowed** |
| body.name | string | Name of the anime. | - | - | **required** |
| body.rating | string | Rating of the show. | - | - | **required** |
| body.genre | string | The genre of anime. | - | - | **required** |
| body.studio | string | The studio of anime. | - | - | **required** |

#### Message `trendingAnime`

*Data required to populate trending anime*

##### Payload

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| (root) | object | - | - | - | **additional properties are allowed** |
| name | string | Name of the anime. | - | - | **required** |
| rating | string | Rating of the show. | - | - | **required** |
| genre | string | The genre of anime. | - | - | **required** |
| studio | string | The studio of anime. | - | - | **required** |

> Examples of payload _(generated)_
```json
{
"name": "string",
"rating": "string",
"genre": "string",
"studio": "string"
}
```



### SUB `trendingAnime` Operation

#### `http` Channel specific information

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| type | - | - | `"request"` | - | - |
| method | - | - | `"POST"` | - | - |
| bindingVersion | - | - | `"0.1.0"` | - | - |
| query | object | - | - | - | **additional properties are allowed** |
| query.name | string | Name of the anime. | - | - | **required** |
| query.rating | string | Rating of the show. | - | - | **required** |
| query.genre | string | The genre of anime. | - | - | **required** |
| query.studio | string | The studio of anime. | - | - | **required** |
| body | object | - | - | - | **additional properties are allowed** |
| body.name | string | Name of the anime. | - | - | **required** |
| body.rating | string | Rating of the show. | - | - | **required** |
| body.genre | string | The genre of anime. | - | - | **required** |
| body.studio | string | The studio of anime. | - | - | **required** |

#### Message `<anonymous-message-2>`

##### Payload

| Name | Type | Description | Value | Constraints | Notes |
|---|---|---|---|---|---|
| (root) | object | - | - | - | **additional properties are allowed** |

> Examples of payload _(generated)_
```json
{}
```



Loading

0 comments on commit 22acee1

Please sign in to comment.