Skip to content

Commit 9d53de5

Browse files
bugwellechgeo
andauthored
fix: Fix cds-snippet-checker errors (#1430)
Fixes issues introduced in 4534536 and dc5800c --------- Co-authored-by: Christian Georgi <christian.georgi@sap.com>
1 parent 527ccd3 commit 9d53de5

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

cds/cdl.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ The *CDS Definition Language (CDL)* is a human-readable language for defining CD
4343
*Keywords* in CDL are used to prelude statements, such as imports and namespace directives as well as entity and type declarations. *Identifiers* are used to refer to definitions.
4444

4545
```cds
46+
namespace capire.bookshop;
4647
using { managed } from `@sap/cds/common`;
4748
aspect entity : managed { key ID: Integer }
48-
namespace capire.bookshop;
4949
5050
entity Books : entity {
5151
title : String;
@@ -93,6 +93,7 @@ Delimited identifiers in general, but in articular non-ansi characters, or keywo
9393

9494
The following literals can be used in CDL (mostly as in JavaScript, Java, and SQL):
9595

96+
<!-- cds-mode: ignore; values only, no valid CDS file -->
9697
```cds
9798
true , false , null // as in all common languages
9899
11 , 2.4 , 1e3, 1.23e-11 // for numbers
@@ -105,8 +106,9 @@ true , false , null // as in all common languages
105106

106107
#### Date & Time Literals
107108

108-
In addition type-keyword-prefixed strings can be used for date & time literals:
109+
In addition, type-keyword-prefixed strings can be used for date & time literals:
109110

111+
<!-- cds-mode: ignore; values only, no valid CDS file -->
110112
```cds
111113
date'2016-11-24'
112114
time'16:11:32'

cds/compiler/hdbcds-to-hdbtable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ In contrast to the `hdbtable` plugin, the `hdbcds` plugin is able to handle remo
120120

121121
## Multiline Doc Comments
122122

123-
This is only relevant if you have switched on [Doc Comments](../../cds/cdl#doc-comments-%E2%80%94)
123+
This is only relevant if you have switched on [Doc Comments](../../cds/cdl#doc-comment)
124124
and if you have enabled translation of doc comments to the `COMMENT` feature in the database.
125125

126126
Doc comments can span across multiple lines:

guides/domain-modeling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ entity name {
253253
}
254254
```
255255

256-
[Learn more about entity definitions](../cds/cdl.md#entity-and-type-definitions){.learn-more}
256+
[Learn more about entity definitions](../cds/cdl.md#views-projections){.learn-more}
257257

258258

259259

@@ -267,7 +267,7 @@ entity ProjectedEntity as select from BaseEntity {
267267
};
268268
```
269269

270-
[Learn more about views and projections](../cds/cdl.md#views-and-projections){.learn-more}
270+
[Learn more about views and projections](../cds/cdl.md#views-projections){.learn-more}
271271

272272

273273

guides/providing-services.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,12 +903,14 @@ entity Foo {
903903

904904
By default, specified `[min,max]` ranges are interpreted as closed intervals, that means, the performed checks are `min ≤ input ≤ max`. You can also specify open intervals by wrapping the *min* and/or *max* values into parenthesis like that:
905905

906+
<!-- cds-mode: ignore; duplicate annotations -->
906907
```cds
907908
@assert.range: [(0),100] // 0 < input ≤ 100
908909
@assert.range: [0,(100)] // 0 ≤ input < 100
909910
@assert.range: [(0),(100)] // 0 < input < 100
910911
```
911912
In addition, you can use an underscore `_` to represent *Infinity* like that:
913+
<!-- cds-mode: ignore; duplicate annotations -->
912914
```cds
913915
@assert.range: [(0),_] // positive numbers only, _ means +Infinity here
914916
@assert.range: [_,(0)] // negative number only, _ means -Infinity here

java/working-with-cql/query-execution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ The parameter `mode` allows to specify whether an `EXCLUSIVE` or a `SHARED` lock
403403

404404
## Runtime Views { #runtimeviews}
405405

406-
The CDS compiler generates [SQL DDL](../../guides/databases?impl-variant=java#generating-sql-ddl) statements based on your CDS model, which include SQL views for all CDS [views and projections](../../cds/cdl#views-and-projections). This means adding or changing CDS views requires a deployment of the database schema changes.
406+
The CDS compiler generates [SQL DDL](../../guides/databases?impl-variant=java#generating-sql-ddl) statements based on your CDS model, which include SQL views for all CDS [views and projections](../../cds/cdl#views-projections). This means adding or changing CDS views requires a deployment of the database schema changes.
407407

408408
To avoid schema updates due to adding or updating CDS views, annotate them with [@cds.persistence.skip](../../guides/databases#cds-persistence-skip). In this case the CDS compiler won't generate corresponding static database views. Instead, the CDS views are dynamically resolved by the CAP Java runtime.
409409

0 commit comments

Comments
 (0)