Skip to content

Commit

Permalink
Fix broken docs; Tidy up hexy api sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiruhayel committed Mar 14, 2024
1 parent b2a49d6 commit 75e4a7c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions backend/infra/api-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const generateApiSpec = ({
paths: {
'/borrower': {
post: {
tags: ['Borrower'],
summary: 'Create a borrower',
requestBody: {
required: true,
Expand Down Expand Up @@ -159,6 +160,7 @@ export const generateApiSpec = ({
},
'/borrowingCapacity': {
get: {
tags: ['Borrowing Capacity'],
summary: 'Get an estimate of your borrowing capacity',
parameters: [
{
Expand Down Expand Up @@ -256,6 +258,7 @@ export const generateApiSpec = ({
},
'/loan': {
post: {
tags: ['Loan Application'],
summary: 'Apply for a loan',
requestBody: {
required: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/borrower-profile/explore-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
1. In your browser, navigate to the `Create a Borrower` API documentation:

```text
http://localhost:3000/docs/hexy/create-a-borrower
http://localhost:3000/hexyback-workshop/docs/hexy/create-a-borrower
```

2. Modify the sample request body:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/borrowing-capacity/explore-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
1. In your browser, navigate to the `Borrowing Capacity` API documentation:

```text
http://localhost:3000/docs/hexy/get-an-estimate-of-your-borrowing-capacity
http://localhost:3000/hexyback-workshop/docs/hexy/get-an-estimate-of-your-borrowing-capacity
```

2. Modify the sample request parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,6 @@ Kill the running documentation server (`Ctrl+C`) and run the following:
pnpm run docs
```

Navigate to: `http://localhost:3000/docs/hexy/apply-for-a-loan`. You'll see the updated API documentation for the `Apply for Loan` endpoint:
Navigate to: `http://localhost:3000/hexyback-workshop/docs/hexy/apply-for-a-loan`. You'll see the updated API documentation for the `Apply for Loan` endpoint:

![`Apply for Loan` API Endpoint](/img/loan-application/updated-apply-for-loan-api-docs.png)
8 changes: 6 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ const config = {
style: 'dark',
links: [
{
title: 'Docs',
title: 'Documentation',
items: [
{
label: 'Tutorial',
label: 'Workshop',
to: '/docs/intro',
},
{
label: 'Hexy API',
to: '/docs/category/hexy-api',
},
],
},
{
Expand Down
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
workshopSidebar: [{ type: 'autogenerated', dirName: '.' }],
openApiSidebar: [
{
type: 'category',
Expand Down

0 comments on commit 75e4a7c

Please sign in to comment.