Skip to content

Releases: SAP/cloud-sdk-js

v1.42.0

03 May 14:58
Compare
Choose a tag to compare

Compatibility Notes

  • [core] Use HEAD instead of GET 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 for mockHeaderRequest() 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 to openapi-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 the filter() of OData request builders.

Improvements

  • [odata] Allow using filter functions with boolean return types directly in the filter() of OData request builders without equals(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

01 Apr 16:27
Compare
Choose a tag to compare

Compatibility Notes

  • [core] Deprecated userApprovedServiceToken, refreshTokenGrant and userTokenGrant.
  • [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 and jwtBearerTokenGrant authorization.
  • [http-client] Add a fetchCsrfToken option to executeHttpRequest 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 with null 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

19 Mar 09:31
Compare
Choose a tag to compare

Compatibility Notes

  • A mandatory property request is added to the HttpResponse.

New Functionality

  • [core] Support executeRaw in all RequestBuilder, which returns HttpResponse 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

03 Mar 19:49
Compare
Choose a tag to compare

Compatibility Notes

  • [core] Deprecated _customFields in the fromJson 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 and x-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

18 Feb 18:21
392a091
Compare
Choose a tag to compare

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

10 Feb 14:10
Compare
Choose a tag to compare

New Functionality

  • [openApi-generator] Support the generation of transpiled JavaScript OpenAPI clients with the new flags: generateJs and tsConfig.

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

20 Jan 16:04
Compare
Choose a tag to compare

Improvements

  • [openapi-generator] Improve generation for duplicate operation names and non existing operationIds.

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

15 Jan 09:42
Compare
Choose a tag to compare

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

13 Jan 15:52
Compare
Choose a tag to compare

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

08 Jan 09:21
Compare
Choose a tag to compare

Compatibility Notes

  • The return type of Entity.getUpdatedProperties was incorrect and was corrected to Record<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 to Record<string, any>.
  • Ship templates files that are used in the OpenAPI generator.