Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readme gen #8

Merged
merged 7 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 0 additions & 30 deletions API-Modules/greetings-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ _No description for this module_

## Table of Contents
- [/greetings/get](#endpt-1)
- [/greetings/say/hi](#endpt-2)

___
###### endpt #1
Expand Down Expand Up @@ -35,32 +34,3 @@ Example Response:
```
[]
```
___
###### endpt #2
```
GET - /greetings/say/hi
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- Returns Hi!

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
/greetings/say/hi?version=1
```

Example Response:
```
"Hi!"
```
32 changes: 31 additions & 1 deletion API-Modules/greetings-say-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,41 @@
_No description for this module_

## Table of Contents
- [/greetings/say/hi](#endpt-1)
- [/greetings/say/:greeting](#endpt-1)
- [/greetings/say/hi](#endpt-2)

___
###### endpt #1
```
GET - /greetings/say/:greeting
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- Returns the greeting!

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
/greetings/say/:greeting?version=1
```

Example Response:
```
"Hi!"
```
___
###### endpt #2
```
GET - /greetings/say/hi
```

Expand Down
6 changes: 3 additions & 3 deletions AUTOGENERATED-API-README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RIO Example API

## API Modules
- [/greetings/say](API-Modules/greetings-say-API.md) (1 total endpoint)
- [/greetings](API-Modules/greetings-API.md) (2 total endpoints)
- [/math](API-Modules/math-API.md) (2 total endpoints)
- [/v2](API-Modules/v2-API.md) (5 total endpoints)
- [/greetings/say](API-Modules/greetings-say-API.md) (2 total endpoints)
- [/greetings](API-Modules/greetings-API.md) (1 total endpoint)
- [/math](API-Modules/math-API.md) (2 total endpoints)
- [Misc](API-Modules/Misc-API.md) (2 total endpoints)

Total Endpoints: 12
6 changes: 3 additions & 3 deletions PUBLIC-AUTOGENERATED-API-README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RIO Example API

## API Modules
- [/greetings/say](Public-API-Modules/greetings-say-API.md) (1 total endpoint)
- [/greetings](Public-API-Modules/greetings-API.md) (2 total endpoints)
- [/math](Public-API-Modules/math-API.md) (1 total endpoint)
- [/v2](Public-API-Modules/v2-API.md) (5 total endpoints)
- [/greetings/say](Public-API-Modules/greetings-say-API.md) (2 total endpoints)
- [/greetings](Public-API-Modules/greetings-API.md) (1 total endpoint)
- [/math](Public-API-Modules/math-API.md) (1 total endpoint)
- [Misc](Public-API-Modules/Misc-API.md) (2 total endpoints)

Total Endpoints: 11
30 changes: 0 additions & 30 deletions Public-API-Modules/greetings-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ _No description for this module_

## Table of Contents
- [/greetings/get](#endpt-1)
- [/greetings/say/hi](#endpt-2)

___
###### endpt #1
Expand Down Expand Up @@ -35,32 +34,3 @@ Example Response:
```
[]
```
___
###### endpt #2
```
GET - /greetings/say/hi
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- Returns Hi!

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
/greetings/say/hi?version=1
```

Example Response:
```
"Hi!"
```
32 changes: 31 additions & 1 deletion Public-API-Modules/greetings-say-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,41 @@
_No description for this module_

## Table of Contents
- [/greetings/say/hi](#endpt-1)
- [/greetings/say/:greeting](#endpt-1)
- [/greetings/say/hi](#endpt-2)

___
###### endpt #1
```
GET - /greetings/say/:greeting
```

**Status**: LIVE

**Availability**: PUBLIC

#### Description:
- Returns the greeting!

Params:

| Name | Type | Description |
|--|--|--|
| **version** | `integer` | A version number (*Required)


Example Request:
```
/greetings/say/:greeting?version=1
```

Example Response:
```
"Hi!"
```
___
###### endpt #2
```
GET - /greetings/say/hi
```

Expand Down
2 changes: 1 addition & 1 deletion __tests__/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ afterAll(async () => {
describe('Using rio.get, rio.put, rio.post, rio.patch, and rio.delete', () => {
test('Checking endpoints', async () => {
const { routes } = rio.utils.getEndpoints(app, rio.paths);
expect(routes.length).toBe(29);
expect(routes.length).toBe(18);
});

test('Get sum', async () => {
Expand Down
11 changes: 11 additions & 0 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ rio.get(
'Hi!',
);

rio.get(
'/greetings/say/:greeting',
(req, res) => {
const { greeting } = req.params;
res.status(200).send(greeting);
},
[],
'Returns the greeting!',
'Hi!',
);

rio.get(
'/greetings/get',
(req, res) => {
Expand Down
Loading
Loading