🤖 Bip Bop - Fusion Framework Release #2492
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
@equinor/[email protected]
Minor Changes
#2491
73af73e
Thanks @odinr! - Added a new operatorcapitalizeRequestMethodOperator
to ensure that the HTTP method of a given request is in uppercase.capitalizeRequestMethodOperator
which processes an HTTP request object and converts its method to uppercase.Example usage:
Adding the operator to the
HttpClient
:#2491
73af73e
Thanks @odinr! - TheHttpClientConfigurator
now has by default thecapitalizeRequestMethodOperator
andrequestValidationOperator
enabled.CapitalizeRequestMethodOperator
This operator will capitalize the HTTP method name before sending the request. This is useful when you are using a client that requires the HTTP method to be capitalized. If you want to disable this operator, you can do so by removing it from the
HttpClientConfigurator
:RequestValidationOperator
This operator will parse and validate the request before sending it. If the request is invalid, the error will be logged to the console. If you want to disable this operator, you can do so by removing it from the
HttpClientConfigurator
:If you wish stricter validation, you can enable the
strict
mode by setting thestrict
property totrue
:#2491
73af73e
Thanks @odinr! - Addedremove
to theProcessOperators
to allow for the removal of a specific operator. This is useful for removing operators that are not desired, example default operators included in initial configuration.example:
#2491
73af73e
Thanks @odinr! - New Feature: EnhancedrequestValidationOperator
The
requestValidationOperator
is a utility function that validates incoming requests against a Zod schema. This function has two options:strict
andparse
. Thestrict
option allows you to enforce strict validation, while theparse
option enables you to return the parsed request object if it passes validation.The
requestValidationOperator
is meant to be used as a request operator in the Fusion API framework. It is a higher-order function that takes a Zod schema as an argument and returns a function that validates incoming requests against that schema.strict
is set totrue
, the validation will fail if there are additional properties not defined in the schema.strict
is set tofalse
or omitted, additional properties will be allowed and passed through without causing validation errors.parse
is enabled, the function will return the parsed and potentially transformed request object if it passes validation.parse
is not enabled, the function will not return anything even if the request object is valid.To use the new
strict
andparse
options, update your code as follows:Example usage with strict validation:
Example usage with parsing enabled:
Example usage with both strict validation and parsing enabled:
Example usage with the
HttpClient
:@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
#2493
4839295
Thanks @eikeland! - Updating fusion-wc-person to fix issues when using selectedPerson = null in PersonSelect component.Updated the following dependencies
@equinor/fusion-wc-person
from^3.0.1
to^3.0.3
inpackages/cli/package.json
andpackages/react/components/people-resolver/package.json
.Updated dependencies [
4839295
]:@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
73af73e
Thanks @odinr! - Capatalize http request method verb to uppercase@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
#2493
4839295
Thanks @eikeland! - Updating fusion-wc-person to fix issues when using selectedPerson = null in PersonSelect component.Updated the following dependencies
@equinor/fusion-wc-person
from^3.0.1
to^3.0.3
inpackages/cli/package.json
andpackages/react/components/people-resolver/package.json
.Updated dependencies [
73af73e
]:@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
#2491
73af73e
Thanks @odinr! - Capatalize http request method verb to uppercaseUpdated dependencies [
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
@equinor/[email protected]
Patch Changes
73af73e
,73af73e
,73af73e
,73af73e
]:@equinor/[email protected]
Patch Changes
4839295
]:@equinor/[email protected]
Patch Changes
4839295
]:@equinor/[email protected]
Patch Changes
4839295
,73af73e
,73af73e
,73af73e
,73af73e
]: