Releases: SAP/cloud-sdk-js
Releases · SAP/cloud-sdk-js
v1.42.0
Compatibility Notes
- [core] Use
HEAD
instead ofGET
when fetching CSRF tokens. Change the URL for CSRF token fetching in OData requests from the service URL to the request URL. - [test-util] Use
HEAD
formockHeaderRequest()
to align with the core behaviour. - [core] Remove experimental
Exclude
type, which was accidentally exposed as non-experimental. - [openapi-generator] Rename the CLI generator command from
generate-openapi-client
toopenapi-generator
. - [openapi-generator] Rename some generator options and default behavior of those options (details).
New Functionality
- [openapi-generator] Release the SAP Cloud SDK OpenAPI generator.
- [core] Support custom axios options for all request builders.
- [core] Support disabling csrf token request as an option for all request builders.
- [odata] Support unary operator
not
in thefilter()
of OData request builders.
Improvements
- [odata] Allow using filter functions with boolean return types directly in the
filter()
of OData request builders withoutequals(true)
. - [odata-generator] Disable the
execute
function, when an entity type is shared by multiple entity sets and is used as the return type of function/action imports. - [openapi-generator] Introduce
verbose
option to enable verbose logging. - [openapi-generator] Introduce
overwrite
option to allow overwriting of existing files. - [openapi-generator] Introduce
include
option to allow copying files to the generated clients.
v1.41.0
Compatibility Notes
- [core] Deprecated
userApprovedServiceToken
,refreshTokenGrant
anduserTokenGrant
. - [openapi-generator] Replace the underlying Java-based OpenAPI generator with a custom implementation.
- [odata-generator] The type of one-to-one navigation properties is now optional.
New Functionality
- [core] Added support for
jwtBearerToken
andjwtBearerTokenGrant
authorization. - [http-client] Add a
fetchCsrfToken
option toexecuteHttpRequest
to allow automatic fetching of CSRF tokens for write operations. - [openapi-generator] Fetch CSRF tokens for write operations automatically.
Fixed Issues
- [odata-generator] Fix a type error of one-to-one navigation properties, so they can set
null
as valid values. - [core] Fix a runtime error of
fromJson
function, when passing an object containing one-to-one navigation properties withnull
value. - [odata-batch] Fix wrong double encoding of filter values in batch requests.
- [openapi-generator] Use string as default type for enums.
v1.40.0
Compatibility Notes
- A mandatory property
request
is added to theHttpResponse
.
New Functionality
- [core] Support
executeRaw
in allRequestBuilder
, which returnsHttpResponse
that contains the raw response and original request.
Improvements
- [http-agent] Fix client certificate authentication in conjunction with proxies - depends on this PR.
Fixed Issues
- [core] Fix parsing of empty bodies in batch responses.
v1.39.0
Compatibility Notes
- [core] Deprecated
_customFields
in thefromJson
method of the entity builders. Instead, add custom fields to the JSON objects directly.
New Functionality
- [openapi-generator] Support custom API names and operation names by using OpenAPI extensions
x-sap-cloud-sdk-api-name
andx-sap-cloud-sdk-operation-name
.
Fixed Issues
- [core] Fix building of entities using
fromJson
with navigation properties. - [odata-generator] The exit code of the node process is set to 1 in cases of a generator error.
- [odata-generator] Fix the false-positive warning message, when functions/actions are not used by any function/action imports.
v1.38.0
New Functionality
- [openapi-generator] Generate multiple API objects based on tags instead of one API per API specification.
- [openapi-generator] Add option
writeReadme
for generating readme files. - [openapi-generator] Support copying files from given paths via a new option
additionalFiles
. - [eslint-config] Release a recommended, shareable
eslint
configuration based on the SAP Cloud SDK's internal configuration as@sap-cloud-sdk/eslint-config
. Follow the official guide for information how to use the config.
Improvements
- [logger] The stack is included in the logs if
logger.error
is called with an error object.
v1.37.1
New Functionality
- [openApi-generator] Support the generation of transpiled JavaScript OpenAPI clients with the new flags:
generateJs
andtsConfig
.
Fixed Issues
- [generator] Allow enhanced generation with OpenAPI files for all valid OData specification file endings (including e. g. .xml and .EDMX).
v1.37.0
Improvements
- [openapi-generator] Improve generation for duplicate operation names and non existing
operationId
s.
Fixed Issues
- [openapi-generator] Remove the copyright comments from the generated package.json.
- [util] Don't fail on undefined template arguments when using
codeBlock
.
v1.36.1
Fixed Issues
- [openapi-generator] Fix the error
TypeError: Class constructor Command cannot be invoked without 'new'
due to the incompatibility of ES5 and oclif.
v1.36.0
Compatibility Notes
- [openapi-generator] The
package.json
is generated by default.
New Functionality
- [openapi-generator] Support
package.json
generation and the service mapping configuration as CLI options. - [util] Expose
UniqueNameGenerator
class that stores used names and generates a unique name for each given string.
v1.35.0
Compatibility Notes
- The return type of
Entity.getUpdatedProperties
was incorrect and was corrected toRecord<string, any>
.
Fixed Issues
- Fix serialization of linked entities with custom fields.
- Fix setting of remote state on entities to replace old state instead of merging with old state. This also fixes how custom fields are handled in the remote state.
- Fix return type of
Entity.getUpdatedProperties
toRecord<string, any>
. - Ship templates files that are used in the OpenAPI generator.