diff --git a/packages/openapi-generator/src/openapi.ts b/packages/openapi-generator/src/openapi.ts index a7fe83de..7f0d3736 100644 --- a/packages/openapi-generator/src/openapi.ts +++ b/packages/openapi-generator/src/openapi.ts @@ -20,18 +20,23 @@ export function schemaToOpenAPI( switch (schema.type) { case 'boolean': case 'string': - case 'number': return { type: schema.type, ...(schema.enum ? { enum: schema.enum } : {}), ...defaultOpenAPIObject, }; - case 'integer': + case 'number': return { type: 'number', ...(schema.enum ? { enum: schema.enum } : {}), ...defaultOpenAPIObject, }; + case 'integer': + return { + type: 'integer', + ...(schema.enum ? { enum: schema.enum } : {}), + ...defaultOpenAPIObject, + }; case 'null': // TODO: OpenAPI v3 does not have an explicit null type, is there a better way to represent this? // Or should we just conflate explicit null and undefined properties? diff --git a/website/docs/intro.md b/website/docs/intro.md index cfcbddea..a29ab6d6 100644 --- a/website/docs/intro.md +++ b/website/docs/intro.md @@ -13,5 +13,5 @@ logic is never called with data it can't handle. [parse, don't validate]: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ -[type and semantic analysis]: +[type and semantic validation]: https://bitgo.github.io/api-ts/docs/tutorial-basics/create-an-api-spec/#what-problem-does-io-ts-http-solve diff --git a/website/src/components/HomepageFeatures/index.js b/website/src/components/HomepageFeatures/index.js index 4ccdb8c2..e5f9c7fa 100644 --- a/website/src/components/HomepageFeatures/index.js +++ b/website/src/components/HomepageFeatures/index.js @@ -38,7 +38,7 @@ export default function HomepageFeatures() { ), }, { - title: 'API definition', + title: 'API Specification', lightSvg: require('@site/static/img/api-m-light-blue.svg').default, darkSvg: require('@site/static/img/api-m-dark-blue.svg').default, description: (