Skip to content

Commit

Permalink
add todos
Browse files Browse the repository at this point in the history
  • Loading branch information
kainpets committed Jun 21, 2024
1 parent f6c3a5f commit b1f461a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/lib/blueprint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { openapi } from '@seamapi/types/connect'

import type { Openapi } from './openapi.js'

interface Parameter {
Expand All @@ -18,7 +16,7 @@ interface Endpoint {
name: string
path: string
method: Method[]
semanticMethod?: string | undefined
semanticMethod?: string
routeDescription?: string | undefined
parameters: Parameter[]
response: Response
Expand Down Expand Up @@ -60,8 +58,9 @@ export const createBlueprint = ({ openapi }: TypesModule): Blueprint => {
name: operation.operationId,
path,
method: [method.toUpperCase() as Method],
// TODO: fix routeDescription
routeDescription: operation.summary,
parameters: [], // Assuming no parameters for simplicity
parameters: [],
response: {
description: Object.values(operation.responses)[0]?.description ?? 'No Description'
}
Expand All @@ -72,7 +71,8 @@ export const createBlueprint = ({ openapi }: TypesModule): Blueprint => {
path,
namespace,
endpoints,
subroutes: null // Assuming no subroutes for simplicity
// TODO: implement optional subroutes extraction
subroutes: null
})
}
}
Expand All @@ -83,5 +83,3 @@ export const createBlueprint = ({ openapi }: TypesModule): Blueprint => {
routes,
}
}

console.log(JSON.stringify(createBlueprint({ openapi }), null, 2))

0 comments on commit b1f461a

Please sign in to comment.