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

Improve swagger and hide some endpoints #86

Merged
merged 6 commits into from
Feb 25, 2025
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
2 changes: 1 addition & 1 deletion apps/api/scripts/test-slippage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');

const BASE_URL = 'http://localhost:3010/chains';
const BASE_URL = 'http://localhost:3010';

const NetworkToChainId = {
Mainnet: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const root: FastifyPluginAsync = async (fastify): Promise<void> => {
'/slippageTolerance',
{
schema: {
description: 'Retrieve a proposed slippage tolerance for a given market',
tags: ['markets'],
params: routeSchema,
response: {
'2XX': successSchema,
Expand Down Expand Up @@ -117,6 +119,7 @@ const root: FastifyPluginAsync = async (fastify): Promise<void> => {
'/volatilityDetails',
{
schema: {
hide: true,
params: routeSchema,
querystring: queryStringSchema,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const root: FastifyPluginAsync = async (fastify): Promise<void> => {
'/usdPrice',
{
schema: {
description: 'Get USD price for a given token',
tags: ['tokens'],
params: paramsSchema,
response: {
'2XX': successSchema,
Expand Down
6 changes: 6 additions & 0 deletions apps/api/src/app/routes/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ interface AboutResponse {
const about: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.get<{ Reply: AboutResponse }>(
'/about',
{
schema: {
description: 'About the BFF API',
tags: ['misc'],
},
},
async function (_request, reply) {
reply.header(
CACHE_CONTROL_HEADER,
Expand Down
8 changes: 7 additions & 1 deletion apps/api/src/app/routes/accounts/_account/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const accounts: FastifyPluginAsync = async (fastify): Promise<void> => {
Reply: NotificationModel[];
}>(
'/notifications',
{ schema: { params: routeSchema } },
{
schema: {
description: 'Get notifications for an account',
tags: ['accounts'],
params: routeSchema,
},
},
async function (request, reply) {
reply.header(
CACHE_CONTROL_HEADER,
Expand Down

This file was deleted.