Skip to content

Releases: BitGo/api-ts

@api-ts/[email protected]

05 Mar 19:31
3359aeb
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.7.0 (2025-03-05)

Features

  • Output boolean query parameters as booleans instead of string enums (#1017)

    This feature update changes how boolean parameters are represented in the OpenAPI specification generated by api-ts. Previously, boolean values in query parameters were represented as string enums with values "true" and "false". With this change, they are now represented as native OpenAPI boolean types.

    Concretely, this httpRoute:

    import * as t from 'io-ts';
    import * as h from '@api-ts/io-ts-http';
    import { BooleanFromString } from 'io-ts-types';
    
    export const route = h.httpRoute({
      path: '/resources',
      method: 'GET',
      request: h.httpRequest({
        query: {
          // Boolean parameters
          isActive: BooleanFromString,
          includeDeleted: BooleanFromString,
          // Mixed boolean/number union
          filterOption: t.union([BooleanFromString, t.number])
        }
      }),
      response: {
        200: t.type({
          results: t.array(t.string),
          pagination: t.type({
            hasMore: t.boolean
          })
        })
      }
    });

    now generates the following OpenAPI specification:

    {
      "openapi": "3.0.3",
      "paths": {
        "/resources": {
          "get": {
            "parameters": [
              {
                "name": "isActive",
                "in": "query",
                "required": true,
                "schema": {
    -              "type": "string",
    -              "enum": ["true", "false"]
    +              "type": "boolean"
                }
              },
              {
                "name": "includeDeleted",
                "in": "query",
                "required": true,
                "schema": {
    -              "type": "string",
    -              "enum": ["true", "false"]
    +              "type": "boolean"
                }
              },
              {
                "name": "filterOption",
                "in": "query",
                "required": true,
                "schema": {
                  "oneOf": [
    -                { "type": "string", "enum": ["true", "false"] },
    +                { "type": "boolean" },
                    { "type": "number" }
                  ]
                }
              }
            ],
            "responses": {
              "200": {
                "description": "OK",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            }
                          },
                          "required": ["hasMore"]
                        }
                      },
                      "required": ["results", "pagination"]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }

    This update aligns with OpenAPI best practices by using native types rather than string-based enumerations for boolean query parameters in API specifications.

@api-ts/[email protected]

10 Feb 23:40
18d8b41
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.6.1 (2025-02-10)

Bug Fixes

  • implement lazy file processing with improved dependency handling (dda6fcd)

@api-ts/[email protected]

07 Feb 15:49
047d2f2
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.6.0 (2025-02-07)

This release contains no differences to functionality or code.

Added tests

  • Add test case for private headers with x-internal tag (99e5ee6)

@api-ts/[email protected]

28 Jan 21:58
486df33
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.5.2 (2025-01-28)

Bug Fixes

  • deduplicate header parameters (4d1de4b)

@api-ts/[email protected]

17 Jan 17:33
45f5fcb
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.5.1 (2025-01-17)

Bug Fixes

@api-ts/[email protected]

16 Jan 16:53
75d1efa
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.5.0 (2025-01-16)

Features

  • Prioritize 'source' property in package.json (cf6eb8c)

@api-ts/[email protected]

24 Dec 16:13
a3d388b
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.4.0 (2024-12-24)

Features

  • openapi-generator: suggest resolution for unknown codec types (e320614)

@api-ts/[email protected]

23 Dec 21:18
159066c
Compare
Choose a tag to compare

@api-ts/typed-express-router 1.1.13 (2024-12-23)

Dependencies

  • @api-ts/superagent-wrapper: upgraded to 1.3.3

@api-ts/[email protected]

23 Dec 21:18
159066c
Compare
Choose a tag to compare

@api-ts/superagent-wrapper 1.3.3 (2024-12-23)

Bug Fixes

  • import Node.js path module using node: import syntax (8eecfe7)

@api-ts/[email protected]

23 Dec 21:18
159066c
Compare
Choose a tag to compare

@api-ts/openapi-generator 5.3.1 (2024-12-23)

Bug Fixes

  • import Node.js path module using node: import syntax (8eecfe7)