Skip to content

Commit

Permalink
change types order
Browse files Browse the repository at this point in the history
  • Loading branch information
kainpets committed Jun 22, 2024
1 parent 96c53bf commit f16c7d4
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/lib/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ export interface Blueprint {
name: string
routes: Route[]
}
interface Endpoint {
name: string
path: string
methods: Method[]
semanticMethod: Method
preferredMethod: Method
description: string | null
isDeprecated: boolean
depractionMessage: string
parameters: Parameter[]
response: Response
}

interface Route {
name: string
Expand All @@ -31,6 +19,19 @@ interface Namespace {
path: string
}

interface Endpoint {
name: string
path: string
methods: Method[]
semanticMethod: Method
preferredMethod: Method
description: string | null
isDeprecated: boolean
depractionMessage: string
parameters: Parameter[]
response: Response
}

interface Parameter {
name: string
// TODO generate isRequired, isDeprecated, deprecationMessage from https://github.com/seamapi/nextlove/pull/133/files
Expand Down Expand Up @@ -67,7 +68,7 @@ export const createBlueprint = ({ openapi }: TypesModule): Blueprint => {
name: operation.operationId,
path,
methods: [method.toUpperCase() as Method],
description: operation.summary || 'No Description',
description: (operation.summary != null) || 'No Description',

Check failure on line 71 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Typecheck (Node.js v18)

Type 'true | "No Description"' is not assignable to type 'string | null'.

Check failure on line 71 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Typecheck (Node.js v20)

Type 'true | "No Description"' is not assignable to type 'string | null'.

Check failure on line 71 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Build / Package

Type 'true | "No Description"' is not assignable to type 'string | null'.
parameters: {
isRequired: false,

Check failure on line 73 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Typecheck (Node.js v18)

Object literal may only specify known properties, and 'isRequired' does not exist in type 'Parameter[]'.

Check failure on line 73 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Typecheck (Node.js v20)

Object literal may only specify known properties, and 'isRequired' does not exist in type 'Parameter[]'.

Check failure on line 73 in src/lib/blueprint.ts

View workflow job for this annotation

GitHub Actions / Build / Package

Object literal may only specify known properties, and 'isRequired' does not exist in type 'Parameter[]'.
isDeprecated: false,
Expand Down

0 comments on commit f16c7d4

Please sign in to comment.