Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #4553

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Version Packages #4553

merged 1 commit into from
Mar 6, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 3, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@effect/ai@0.10.7

Patch Changes

@effect/ai-anthropic@0.0.7

Patch Changes

@effect/ai-openai@0.13.7

Patch Changes

@effect/cli@0.56.7

Patch Changes

@effect/cluster@0.26.7

Patch Changes

@effect/cluster-browser@0.20.7

Patch Changes

@effect/cluster-node@0.27.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/cluster@0.26.7
    • @effect/rpc@0.52.7

@effect/cluster-workflow@0.25.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/cluster@0.26.7
    • @effect/sql@0.30.7

effect@3.13.7

Patch Changes

  • #4540 840cc73 Thanks @gcanti! - Add additionalPropertiesStrategy option to OpenApi.fromApi, closes From Discord: Issue with additionalProperties: false in OpenAPI Schema Generation #4531.

    This update introduces the additionalPropertiesStrategy option in OpenApi.fromApi, allowing control over how additional properties are handled in the generated OpenAPI schema.

    • When "strict" (default), additional properties are disallowed ("additionalProperties": false).
    • When "allow", additional properties are allowed ("additionalProperties": true), making APIs more flexible.

    The additionalPropertiesStrategy option has also been added to:

    • JSONSchema.fromAST
    • OpenApiJsonSchema.makeWithDefs

    Example

    import {
      HttpApi,
      HttpApiEndpoint,
      HttpApiGroup,
      OpenApi
    } from "@effect/platform"
    import { Schema } from "effect"
    
    const api = HttpApi.make("api").add(
      HttpApiGroup.make("group").add(
        HttpApiEndpoint.get("get", "/").addSuccess(
          Schema.Struct({ a: Schema.String })
        )
      )
    )
    
    const schema = OpenApi.fromApi(api, {
      additionalPropertiesStrategy: "allow"
    })
    
    console.log(JSON.stringify(schema, null, 2))
    /*
    {
      "openapi": "3.1.0",
      "info": {
        "title": "Api",
        "version": "0.0.1"
      },
      "paths": {
        "/": {
          "get": {
            "tags": [
              "group"
            ],
            "operationId": "group.get",
            "parameters": [],
            "security": [],
            "responses": {
              "200": {
                "description": "Success",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "required": [
                        "a"
                      ],
                      "properties": {
                        "a": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  }
                }
              },
              "400": {
                "description": "The request did not match the expected schema",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "components": {
        "schemas": {
          "HttpApiDecodeError": {
            "type": "object",
            "required": [
              "issues",
              "message",
              "_tag"
            ],
            "properties": {
              "issues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Issue"
                }
              },
              "message": {
                "type": "string"
              },
              "_tag": {
                "type": "string",
                "enum": [
                  "HttpApiDecodeError"
                ]
              }
            },
            "additionalProperties": true,
            "description": "The request did not match the expected schema"
          },
          "Issue": {
            "type": "object",
            "required": [
              "_tag",
              "path",
              "message"
            ],
            "properties": {
              "_tag": {
                "type": "string",
                "enum": [
                  "Pointer",
                  "Unexpected",
                  "Missing",
                  "Composite",
                  "Refinement",
                  "Transformation",
                  "Type",
                  "Forbidden"
                ],
                "description": "The tag identifying the type of parse issue"
              },
              "path": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PropertyKey"
                },
                "description": "The path to the property where the issue occurred"
              },
              "message": {
                "type": "string",
                "description": "A descriptive message explaining the issue"
              }
            },
            "additionalProperties": true,
            "description": "Represents an error encountered while parsing a value to match the schema"
          },
          "PropertyKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "required": [
                  "_tag",
                  "key"
                ],
                "properties": {
                  "_tag": {
                    "type": "string",
                    "enum": [
                      "symbol"
                    ]
                  },
                  "key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "description": "an object to be decoded into a globally shared symbol"
              }
            ]
          }
        },
        "securitySchemes": {}
      },
      "security": [],
      "tags": [
        {
          "name": "group"
        }
      ]
    }
    */
  • #4541 9bf8a74 Thanks @fubhy! - Disallowed excess properties for various function options

  • #4554 87ba23c Thanks @gcanti! - ConfigProvider: fromEnv: add missing Partial modifier.

@effect/experimental@0.41.7

Patch Changes

@effect/opentelemetry@0.44.7

Patch Changes

@effect/platform@0.77.7

Patch Changes

  • #4540 840cc73 Thanks @gcanti! - Add additionalPropertiesStrategy option to OpenApi.fromApi, closes From Discord: Issue with additionalProperties: false in OpenAPI Schema Generation #4531.

    This update introduces the additionalPropertiesStrategy option in OpenApi.fromApi, allowing control over how additional properties are handled in the generated OpenAPI schema.

    • When "strict" (default), additional properties are disallowed ("additionalProperties": false).
    • When "allow", additional properties are allowed ("additionalProperties": true), making APIs more flexible.

    The additionalPropertiesStrategy option has also been added to:

    • JSONSchema.fromAST
    • OpenApiJsonSchema.makeWithDefs

    Example

    import {
      HttpApi,
      HttpApiEndpoint,
      HttpApiGroup,
      OpenApi
    } from "@effect/platform"
    import { Schema } from "effect"
    
    const api = HttpApi.make("api").add(
      HttpApiGroup.make("group").add(
        HttpApiEndpoint.get("get", "/").addSuccess(
          Schema.Struct({ a: Schema.String })
        )
      )
    )
    
    const schema = OpenApi.fromApi(api, {
      additionalPropertiesStrategy: "allow"
    })
    
    console.log(JSON.stringify(schema, null, 2))
    /*
    {
      "openapi": "3.1.0",
      "info": {
        "title": "Api",
        "version": "0.0.1"
      },
      "paths": {
        "/": {
          "get": {
            "tags": [
              "group"
            ],
            "operationId": "group.get",
            "parameters": [],
            "security": [],
            "responses": {
              "200": {
                "description": "Success",
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "required": [
                        "a"
                      ],
                      "properties": {
                        "a": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  }
                }
              },
              "400": {
                "description": "The request did not match the expected schema",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/HttpApiDecodeError"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "components": {
        "schemas": {
          "HttpApiDecodeError": {
            "type": "object",
            "required": [
              "issues",
              "message",
              "_tag"
            ],
            "properties": {
              "issues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Issue"
                }
              },
              "message": {
                "type": "string"
              },
              "_tag": {
                "type": "string",
                "enum": [
                  "HttpApiDecodeError"
                ]
              }
            },
            "additionalProperties": true,
            "description": "The request did not match the expected schema"
          },
          "Issue": {
            "type": "object",
            "required": [
              "_tag",
              "path",
              "message"
            ],
            "properties": {
              "_tag": {
                "type": "string",
                "enum": [
                  "Pointer",
                  "Unexpected",
                  "Missing",
                  "Composite",
                  "Refinement",
                  "Transformation",
                  "Type",
                  "Forbidden"
                ],
                "description": "The tag identifying the type of parse issue"
              },
              "path": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PropertyKey"
                },
                "description": "The path to the property where the issue occurred"
              },
              "message": {
                "type": "string",
                "description": "A descriptive message explaining the issue"
              }
            },
            "additionalProperties": true,
            "description": "Represents an error encountered while parsing a value to match the schema"
          },
          "PropertyKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "required": [
                  "_tag",
                  "key"
                ],
                "properties": {
                  "_tag": {
                    "type": "string",
                    "enum": [
                      "symbol"
                    ]
                  },
                  "key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "description": "an object to be decoded into a globally shared symbol"
              }
            ]
          }
        },
        "securitySchemes": {}
      },
      "security": [],
      "tags": [
        {
          "name": "group"
        }
      ]
    }
    */
  • #4541 9bf8a74 Thanks @fubhy! - Disallowed excess properties for various function options

  • #4559 f910880 Thanks @tim-smart! - add additional properties options to HttpApiBuilder.middlewareOpenApi

  • #4493 0d01480 Thanks @leonitousconforti! - FetchHttpClient merge headers from request and requestInit

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:

    • effect@3.13.7

@effect/platform-browser@0.56.7

Patch Changes

@effect/platform-bun@0.57.7

Patch Changes

@effect/platform-node@0.73.7

Patch Changes

@effect/platform-node-shared@0.27.7

Patch Changes

@effect/printer@0.41.7

Patch Changes

@effect/printer-ansi@0.41.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/typeclass@0.32.7
    • @effect/printer@0.41.7

@effect/rpc@0.52.7

Patch Changes

@effect/rpc-http@0.50.7

Patch Changes

@effect/sql@0.30.7

Patch Changes

@effect/sql-clickhouse@0.15.7

Patch Changes

@effect/sql-d1@0.28.7

Patch Changes

@effect/sql-drizzle@0.29.7

Patch Changes

@effect/sql-kysely@0.26.7

Patch Changes

@effect/sql-libsql@0.20.7

Patch Changes

@effect/sql-mssql@0.31.7

Patch Changes

@effect/sql-mysql2@0.31.7

Patch Changes

@effect/sql-pg@0.31.7

Patch Changes

@effect/sql-sqlite-bun@0.31.7

Patch Changes

@effect/sql-sqlite-do@0.8.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/experimental@0.41.7
    • @effect/sql@0.30.7

@effect/sql-sqlite-node@0.31.7

Patch Changes

@effect/sql-sqlite-react-native@0.33.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/experimental@0.41.7
    • @effect/sql@0.30.7

@effect/sql-sqlite-wasm@0.31.7

Patch Changes

  • Updated dependencies [840cc73, 9bf8a74, 87ba23c]:
    • effect@3.13.7
    • @effect/experimental@0.41.7
    • @effect/sql@0.30.7

@effect/typeclass@0.32.7

Patch Changes

@effect/vitest@0.19.5

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch 7 times, most recently from 84a9143 to eab449c Compare March 6, 2025 20:36
@github-actions github-actions bot force-pushed the changeset-release/main branch from eab449c to 1fc19f3 Compare March 6, 2025 20:50
@tim-smart tim-smart merged commit f7eae9a into main Mar 6, 2025
@tim-smart tim-smart deleted the changeset-release/main branch March 6, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

From Discord: Issue with additionalProperties: false in OpenAPI Schema Generation
1 participant