Skip to content

Commit e7c405c

Browse files
committed
Clean up readme
1 parent fa40e40 commit e7c405c

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The metadata is openly accessible and is system instance aware.
4141
Depending on the **tenant** the metadata return can potentially vary (reflecting customizations).
4242
This strategy therefore only applies to multi-tenant systems.
4343

44-
When fetching metadata for a specific tenant, the request REQUIRES to add an additional HTTP Header `global-tenant-id` with a [CLD Tenant ID](https://wiki.one.int.sap/wiki/display/CLMAM/CLD+Tenant+ID) as a value.
44+
When fetching metadata for a specific tenant, the request REQUIRES to add an additional HTTP Header `global-tenant-id` with a Tenant ID as a value (use value `740000101` for test purposes in this app).
4545
The application internally maps from the global tenant ID to a local tenant and returns the metadata for the local tenant as requested (see [./src/data/user/tenantMapping.ts](./src/data/user/tenantMapping.ts)).
4646
Therefore the application MUST support the mapping of the global tenant ID to its own tenant IDs.
4747

@@ -54,7 +54,7 @@ In this case metadata would be returned without considering tenant specifics.
5454
The metadata is openly accessible, but system instance aware.
5555
Depending tenant the metadata that is return can vary (reflecting customizations).
5656

57-
When fetching metadata for a specific tenant, the request REQUIRES an additional HTTP Header `local-tenant-id` with a local tenant ID (that the application locally understands) as a value.
57+
When fetching metadata for a specific tenant, the request REQUIRES an additional HTTP Header `local-tenant-id` with a local tenant ID (that the application locally understands) as a value (use value `T1` for test purpose in this app).
5858

5959
If the specified header is missing the request will be identical to the `open` access strategy.
6060
Whether this is supported is defined by additionally supporting the `open` access strategy.

src/api/crm/v1/resources/openApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ async function getOpenApiDefinitionHandler(req: CustomRequest): Promise<OpenAPIV
2222
if (tenantIds.localTenantId) {
2323
// This is the `sap.foo.bar:open-local-tenant-id:v1` access strategy
2424
return getCrmV1ApiDefinition(tenantIds.localTenantId)
25-
} else if (tenantIds.sapGlobalTenantId) {
25+
} else if (tenantIds.globalTenantId) {
2626
// This is the `sap.foo.bar:open-global-tenant-id:v1` access strategy
27-
return getCrmV1ApiDefinition(globalTenantIdToLocalTenantIdMapping[tenantIds.sapGlobalTenantId])
27+
return getCrmV1ApiDefinition(globalTenantIdToLocalTenantIdMapping[tenantIds.globalTenantId])
2828
} else {
2929
// Return the OpenAPI definition without tenant specific modifications
3030
// This is the `open` access strategy

src/api/open-resource-discovery/v1/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export async function ordDocumentV1Api(fastify: FastifyInstance): Promise<void>
3838
if (tenantIds.localTenantId) {
3939
// This is the `sap.foo.bar:open-local-tenant-id:v1` access strategy
4040
return getOrdDocumentForTenant(tenantIds.localTenantId)
41-
} else if (tenantIds.sapGlobalTenantId) {
41+
} else if (tenantIds.globalTenantId) {
4242
// This is the `sap.foo.bar:open-global-tenant-id:v1` access strategy
43-
return getOrdDocumentForTenant(globalTenantIdToLocalTenantIdMapping[tenantIds.sapGlobalTenantId])
43+
return getOrdDocumentForTenant(globalTenantIdToLocalTenantIdMapping[tenantIds.globalTenantId])
4444
} else {
4545
throw new Error(
4646
'No tenant ID provided in the request header via local-tenant-id or global-tenant-id. Hint: for demo purposes it can be set in the query string as well, e.g. ?local-tenant-id=T1',

src/event/odm-finance-costobject/v1/eventCatalogDefinition.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ async function getSapEventCatalogDefinitionHandler(req: CustomRequest): Promise<
2222
if (tenantIds.localTenantId) {
2323
// This is the `sap.foo.bar:open-local-tenant-id:v1` access strategy
2424
return getOdmCostObjectSapEventCatalogDefinition(tenantIds.localTenantId)
25-
} else if (tenantIds.sapGlobalTenantId) {
25+
} else if (tenantIds.globalTenantId) {
2626
// This is the `sap.foo.bar:open-global-tenant-id:v1` access strategy
27-
return getOdmCostObjectSapEventCatalogDefinition(globalTenantIdToLocalTenantIdMapping[tenantIds.sapGlobalTenantId])
27+
return getOdmCostObjectSapEventCatalogDefinition(globalTenantIdToLocalTenantIdMapping[tenantIds.globalTenantId])
2828
} else {
2929
// Return the definition without tenant specific modifications
3030
// This is the `open` access strategy

0 commit comments

Comments
 (0)