Skip to content

Commit

Permalink
fix path parameter parsing for spec validation
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi committed Oct 6, 2022
1 parent da12506 commit 46a460f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/services/spec/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const getPathToRequestLocation = (
}

export const parsePathParameter = (parameterValue: string) => {
return Number(parameterValue) ?? parameterValue
return typeof parameterValue === "number" ? Number(parameterValue) : parameterValue
}

export const validateSpecSchema = (schema: any, version?: number): string[] => {
Expand Down

0 comments on commit 46a460f

Please sign in to comment.