Skip to content

Commit

Permalink
fix: v2 docs links (#1195)
Browse files Browse the repository at this point in the history
* fix v2 docs links

* lint

* use doc id

* update

Co-authored-by: Marika Marszalkowski <868536+marikaner@users.noreply.github.com>
Co-authored-by: Frank Essenberger <56544999+FrankEssenberger@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 23, 2023
1 parent c38e18f commit 1630984
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 33 deletions.
12 changes: 11 additions & 1 deletion STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,28 @@ id: frequently-asked-questions
If you reference files by their path, e.g., `../my-file.mdx`, changes to the `id`, and therefore the slug, will automitcally carry over.
Otherwise you would have to adjust the reference in all files that reference a specific slug.
Therefore you should always reference other files by their (relative) path.
Therefore you should always reference other files by their relative path.
Note: Begin relative path with `./` or `../`.
Not using this notation can result in an old versioned doc linking to the latest doc.
```
... see our [JWT documentation](../retrieve-jwt)
```
```
... the concept of a [destination](features/connectivity/destination.mdx)
```
```
... see our [JWT documentation](../how-to-retrieve-jwt.mdx)
```
```
... the concept of a [destination](./features/connectivity/destination.mdx)
```
<!-- vale on -->
2 changes: 1 addition & 1 deletion docs-js/features/connectivity/on-premise.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ proxyConfiguration?: {
}
```

It will be used by the [HTTP client](generic-http-client.mdx) of the SAP Cloud SDK to execute the request.
It will be used by the [HTTP client](./generic-http-client.mdx) of the SAP Cloud SDK to execute the request.

### Principal Propagation

Expand Down
4 changes: 2 additions & 2 deletions docs-js/features/connectivity/proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ There are three possible types of proxies:
## Manual Configuration

In the `execute()` you can either give an object containing the destination name or you can configure the full destination manually.
If you provide the destination name the SAP Cloud SDK will try to look up as described [here](destination.mdx).
If you provide the destination name the SAP Cloud SDK will try to look up as described [here](./destination.mdx).

In productive use, the manual configuration will not be useful, but for testing, it might be valuable.
The destination object contains a field `proxyConfiguration` in which you can configure a proxy.
Expand Down Expand Up @@ -86,7 +86,7 @@ This is mandatory if principal propagation is used i.e. identity propagation fro
For productive use, you do not want to include a specific proxy configuration in your code.
Here you should let the SAP Cloud SDK handle everything.
Hence, you will provide in the `.execute()` method only the destination name.
This will trigger the destination lookup as described [here](destination.mdx).
This will trigger the destination lookup as described [here](./destination.mdx).

The result of the lookup is a destination object which contains a property called `ProxyType`.
This property can have three values: `Internet`, `OnPremise`, and `PrivateLink`:
Expand Down
2 changes: 1 addition & 1 deletion docs-js/features/mail-client/mail-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ As the destination object might contain credentials, using it in production shou

:::

You can read more about the abstraction of the `destination` in the documentation [here](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination).
You can read more about the abstraction of the `destination` in the documentation [here](../connectivity/destination.mdx).

### Send Multiple E-Mails

Expand Down
2 changes: 1 addition & 1 deletion docs-js/features/odata/v2/request-builder.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The function import request builder helps build a request for service operations including their parameters.
Not all services expose function imports.
The example uses the [Warehouse Outbound Delivery Order service](https://api.sap.com/api/API_WHSE_OUTB_DLV_ORDER/resource).
To learn how to generate an API client from the service definition, look at [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from the service definition, look at [this article](../generate-odata-client.mdx).

The example below creates a function import request builder for the service operation `PostGoodsIssue` and then executes it against your destination.

Expand Down
2 changes: 1 addition & 1 deletion docs-js/features/odata/v4/request-builder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Operations can be _bound_ or _unbound_.
Bound means that the operation is tied to an entity.
This is similar to how a method is tied to a class instance in object oriented languages, while functions or "static" methods are not tied to an instance.

To learn how to generate an API client from the service definition, look at [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from the service definition, look at [this article](../generate-odata-client.mdx).

### Using Operations

Expand Down
2 changes: 1 addition & 1 deletion docs-js/guides/sdk-in-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A frontend application set up using either of the following:
## Include the SAP Cloud SDK

The example below uses the business partner API.
To learn how to generate an API client from a service definition, refer to [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from a service definition, refer to [this article](../features/odata/generate-odata-client.mdx).

```ts
//In the .html part of the component
Expand Down
16 changes: 8 additions & 8 deletions docs-js/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ThemedImage from '@theme/ThemedImage';

## Quick Start

For a quick start check out the ["Getting Started"](getting-started.mdx) page.
For a quick start check out the ["Getting Started"](./getting-started.mdx) page.

## What is the SAP Cloud SDK for JavaScript?

Expand Down Expand Up @@ -65,7 +65,7 @@ The image below shows the relationship between the individual core libraries.
#### `@sap-cloud-sdk/connectivity`

The connectivity library provides functionality to read and exchange with services like the destination, XSUAA, and connectivity service.
It provides the basic types needed to reflect the concept of a [destination](features/connectivity/destination.mdx) throughout the SAP Cloud SDK for JavaScript.
It provides the basic types needed to reflect the concept of a [destination](./features/connectivity/destination.mdx) throughout the SAP Cloud SDK for JavaScript.

#### `@sap-cloud-sdk/http-client`

Expand Down Expand Up @@ -102,7 +102,7 @@ The license of clients generated with the SAP Cloud SDK depends on the used serv
The SAP Cloud SDK releases [bi-weekly](https://github.com/SAP/cloud-sdk-js/releases) assuming that new changes are available.

Major releases of the SAP Cloud SDK for JavaScript usually occur every six to twelve months.
For details, check the [release policy](release-policy.mdx).
For details, check the [release policy](./release-policy.mdx).

## Comparison With SAP OData Library

Expand All @@ -111,11 +111,11 @@ The [SAP OData library](https://github.com/SAP/odata-library) is developed by a
It evaluates service specifications at runtime and helps you execute requests.
The table below tries to draw a line between the two open-source libraries:

| OData library | SAP Cloud SDK |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Supports JavaScript. | Supports JavaScript and TypeScript. |
| Operates dynamically on the metadata and creates an on-the-fly-client. | Typed API clients can be [generated](features/odata/generate-odata-client.mdx). An [generic, untyped client](features/connectivity/generic-http-client.mdx) is also available. |
| Connectivity needs to be handled manually. | The SAP Cloud SDK handles [connectivity](features/connectivity/destination.mdx) on the SAP BTP for typed and untyped API clients. |
| OData library | SAP Cloud SDK |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Supports JavaScript. | Supports JavaScript and TypeScript. |
| Operates dynamically on the metadata and creates an on-the-fly-client. | Typed API clients can be [generated](./features/odata/generate-odata-client.mdx). An [generic, untyped client](./features/connectivity/generic-http-client.mdx) is also available. |
| Connectivity needs to be handled manually. | The SAP Cloud SDK handles [connectivity](./features/connectivity/destination.mdx) on the SAP BTP for typed and untyped API clients. |

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docs-js/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm install @sap-cloud-sdk/http-client

## Connectivity Issue

You are experiencing connectivity issues using the SAP Cloud SDK and the [error logs](features/error-handling.mdx) are not conclusive?
You are experiencing connectivity issues using the SAP Cloud SDK and the [error logs](./features/error-handling.mdx) are not conclusive?
In such a case please follow the flowchart.
For each squared box, a dedicated section gives instructions below.
The circle indicate start and end points.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ proxyConfiguration?: {
}
```

It will be used by the [HTTP client](generic-http-client.mdx) of the SAP Cloud SDK to execute the request.
It will be used by the [HTTP client](./generic-http-client.mdx) of the SAP Cloud SDK to execute the request.

### Principal Propagation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ There are three possible types of proxies:
## Manual Configuration

In the `execute()` you can either give an object containing the destination name or you can configure the full destination manually.
If you provide the destination name the SAP Cloud SDK will try to look up as described [here](destination.mdx).
If you provide the destination name the SAP Cloud SDK will try to look up as described [here](./destination.mdx).

In productive use, the manual configuration will not be useful, but for testing, it might be valuable.
The destination object contains a field `proxyConfiguration` in which you can configure a proxy.
Expand Down Expand Up @@ -86,7 +86,7 @@ This is mandatory if principal propagation is used i.e. identity propagation fro
For productive use, you do not want to include a specific proxy configuration in your code.
Here you should let the SAP Cloud SDK handle everything.
Hence, you will provide in the `.execute()` method only the destination name.
This will trigger the destination lookup as described [here](destination.mdx).
This will trigger the destination lookup as described [here](./destination.mdx).

The result of the lookup is a destination object which contains a property called `Proxy Type`.
This property can have three values: `Internet`, `OnPremise`, and `PrivateLink`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ As the destination object might contain credentials, using it in production shou

:::

You can read more about the abstraction of the `destination` in the documentation [here](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination).
You can read more about the abstraction of the `destination` in the documentation [here](../connectivity/destination.mdx).

### Send Multiple E-Mails

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The function import request builder helps build a request for service operations including their parameters.
Not all services expose function imports.
We will use the [Warehouse Outbound Delivery Order service](https://api.sap.com/api/API_WHSE_OUTB_DLV_ORDER/resource) as an example.
To learn how to generate an API client from the service definition, look at [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from the service definition, look at [this article](../generate-odata-client.mdx).

The example below creates a function import request builder for the service operation `PostGoodsIssue` and then executes it against your destination.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Operations can be _bound_ or _unbound_.
Bound means that the operation is tied to an entity.
This is similar to how a method is tied to a class instance in object oriented languages, while functions or "static" methods are not tied to an instance.

To learn how to generate an API client from the service definition, look at [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from the service definition, look at [this article](../generate-odata-client.mdx).

### Using Operations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A frontend application set up using either of the following:
## Include the SAP Cloud SDK

The example below uses the business partner API.
To learn how to generate an API client from a service definition, refer to [this article](features/odata/generate-odata-client.mdx).
To learn how to generate an API client from a service definition, refer to [this article](../features/odata/generate-odata-client.mdx).

```ts
//In the .html part of the component
Expand Down
16 changes: 8 additions & 8 deletions docs-js_versioned_docs/version-v2/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ThemedImage from '@theme/ThemedImage';

## Quick Start

For a quick start check out the ["Getting Started"](getting-started.mdx) page.
For a quick start check out the ["Getting Started"](./getting-started.mdx) page.

## What is the SAP Cloud SDK for JavaScript?

Expand Down Expand Up @@ -65,7 +65,7 @@ The image below shows the relationship between the individual core libraries.
#### `@sap-cloud-sdk/connectivity`

The connectivity library provides functionality to read and exchange with services like the destination, XSUAA, and connectivity service.
It provides the basic types needed to reflect the concept of a [destination](features/connectivity/destination.mdx) throughout the SAP Cloud SDK for JavaScript.
It provides the basic types needed to reflect the concept of a [destination](./features/connectivity/destination.mdx) throughout the SAP Cloud SDK for JavaScript.

#### `@sap-cloud-sdk/http-client`

Expand Down Expand Up @@ -102,7 +102,7 @@ The license of clients generated with the SAP Cloud SDK depends on the used serv
We usually release [bi-weekly](https://github.com/SAP/cloud-sdk-js/releases).

We intend to release a major version of the SAP Cloud SDK for JavaScript every six to twelve months.
For details, check the [release policy](release-policy.mdx).
For details, check the [release policy](./release-policy.mdx).

## Comparison With SAP OData Library

Expand All @@ -111,11 +111,11 @@ The [SAP OData library](https://github.com/SAP/odata-library) is developed by a
It evaluates service specifications at runtime and helps you execute requests.
The table below tries to draw a line between the two open-source libraries:

| OData library | SAP Cloud SDK |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Supports JavaScript. | Supports JavaScript and TypeScript. |
| Operates dynamically on the metadata and creates an on-the-fly-client. | Typed API clients can be [generated](features/odata/generate-odata-client.mdx). An [generic, untyped client](features/connectivity/generic-http-client.mdx) is also available. |
| Connectivity needs to be handled manually. | The SAP Cloud SDK handles [connectivity](features/connectivity/destination.mdx) on the SAP BTP for typed and untyped API clients. |
| OData library | SAP Cloud SDK |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Supports JavaScript. | Supports JavaScript and TypeScript. |
| Operates dynamically on the metadata and creates an on-the-fly-client. | Typed API clients can be [generated](./features/odata/generate-odata-client.mdx). An [generic, untyped client](./features/connectivity/generic-http-client.mdx) is also available. |
| Connectivity needs to be handled manually. | The SAP Cloud SDK handles [connectivity](./features/connectivity/destination.mdx) on the SAP BTP for typed and untyped API clients. |

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docs-js_versioned_docs/version-v2/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm install @sap-cloud-sdk/http-client

## Connectivity Issue

You are experiencing connectivity issues using the SAP Cloud SDK and the [error logs](features/error-handling.mdx) are not conclusive?
You are experiencing connectivity issues using the SAP Cloud SDK and the [error logs](./features/error-handling.mdx) are not conclusive?
In such a case please follow the flowchart.
For each squared box, a dedicated section gives instructions below.
The circle indicate start and end points.
Expand Down

0 comments on commit 1630984

Please sign in to comment.