Skip to content

Commit

Permalink
Fix property names in Java's Consuming Services guide (#1139)
Browse files Browse the repository at this point in the history
Property names have been adjusted in CAP Java 3.0 and not adjusted in this guide.
  • Loading branch information
beckermarc authored Jul 26, 2024
1 parent b1ca0da commit eb8dbde
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions guides/using-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ spring:
cds:
remote.services:
API_BUSINESS_PARTNER:
destination:
type: "odata-v2"
type: "odata-v2"
```
:::
To work with remote services, add the following dependency to your Maven project:
Expand Down Expand Up @@ -1025,10 +1024,11 @@ Destinations are configured in Spring Boot's _application.yaml_ file:
cds:
remote.services:
API_BUSINESS_PARTNER:
type: "odata-v2"
destination:
name: "cpapp-bupa"
http:
suffix: "/sap/opu/odata/sap"
type: "odata-v2"
```
:::
[Learn more about configuring destinations for Java.](../java/cqn-services/remote-services#destination-based-scenarios){.learn-more}
Expand Down Expand Up @@ -1147,11 +1147,12 @@ Destinations are configured in Spring Boot's _application.yaml_ file.
cds:
remote.services:
REVIEWS:
type: "odata-v4"
destination:
type: "odata-v4"
properties:
url: https://reviews.ondemand.com/reviews
authentication: TokenForwarding
http:
headers:
my-header: "header value"
queries:
Expand All @@ -1169,9 +1170,9 @@ You can use the APIs offered by SAP Cloud SDK to create destinations programmati
cds:
remote.services:
REVIEWS:
type: "odata-v2"
destination:
name: "reviews-destination"
type: "odata-v2"
```
:::
[Learn more about programmatic destination registration.](../java/cqn-services/remote-services#programmatic-destination-registration){.learn-more} [See examples for different authentication types.](../java/cqn-services/remote-services#programmatic-destinations){.learn-more}
Expand Down Expand Up @@ -1255,10 +1256,11 @@ spring:
cds:
remote.services:
- name: API_BUSINESS_PARTNER
type: "odata-v2"
destination:
name: "cpapp-bupa"
http:
suffix: "/sap/opu/odata/sap"
type: "odata-v2"
```
:::
Run your application with the Destination service:
Expand Down Expand Up @@ -1319,8 +1321,8 @@ Or declare the destination in your _application.yaml_ file:
cds:
remote.services:
order-service:
type: "odata-v4"
destination:
type: "odata-v4"
properties:
url: "<set via env var in deployment>"
authentication: TokenForwarding
Expand Down Expand Up @@ -1408,13 +1410,13 @@ cds add xsuaa,destination,connectivity --for production
service: xsuaa
service-plan: application
path: ./xs-security.json

- name: cpapp-destination
type: org.cloudfoundry.managed-service
parameters:
service: destination
service-plan: lite

# Required for on-premise connectivity only
- name: cpapp-connectivity
type: org.cloudfoundry.managed-service
Expand Down Expand Up @@ -1517,8 +1519,8 @@ For Java use the property `retrievalStrategy` in the destination configuration,
cds:
remote.services:
service-for-provider:
type: "odata-v4"
destination:
type: "odata-v4"
retrievalStrategy: "AlwaysProvider"

```
Expand Down

0 comments on commit eb8dbde

Please sign in to comment.