Skip to content

Commit cae395a

Browse files
Aniruddh25junsu0msseantleonardabhishekkumams
authored
Cherry picking bug fixes and github urls usage (#1354)
## Why make this change? Cherry picking the following changes to create a patch for 0.5.x: - #1349 - #1319 - #1351 --------- Co-authored-by: Jun Su <70380073+junsu0ms@users.noreply.github.com> Co-authored-by: Sean Leonard <sean.leonard@microsoft.com> Co-authored-by: abhishekkumams <102276754+abhishekkumams@users.noreply.github.com>
1 parent c545a4e commit cae395a

32 files changed

+3319
-1191
lines changed

.pipelines/build-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ variables:
3030
# The counter is reset when the minor version is updated.
3131
patch: $[counter(format('{0}_{1}', variables['build.reason'], variables['minor']), 0)]
3232
isReleaseBuild: $(isNugetRelease)
33-
additionalProperties.version: 'https://dataapibuilder.azureedge.net/schemas/v$(major).$(minor).$(patch)/dab.draft.schema.json'
33+
additionalProperties.version: 'https://github.com/Azure/data-api-builder/releases/download/v$(major).$(minor).$(patch)/dab.draft.schema.json'
3434

3535
steps:
3636
- task: NuGetAuthenticate@1

config-generators/dab-config.cosmosdb_nosql.reference.json

Lines changed: 0 additions & 147 deletions
This file was deleted.

config-generators/mssql-commands.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ add UpdateBookTitle --config "dab-config.MsSql.json" --source "update_book_title
3535
add GetAuthorsHistoryByFirstName --config "dab-config.MsSql.json" --source "get_authors_history_by_first_name" --source.type "stored-procedure" --source.params "firstName:Aaron" --permissions "anonymous:execute" --rest true --graphql SearchAuthorByFirstName
3636
add InsertAndDisplayAllBooksUnderGivenPublisher --config "dab-config.MsSql.json" --source "insert_and_display_all_books_for_given_publisher" --source.type "stored-procedure" --source.params "title:MyTitle,publisher_name:MyPublisher" --permissions "anonymous:execute" --rest true --graphql true
3737
add GQLmappings --config "dab-config.MsSql.json" --source "GQLmappings" --permissions "anonymous:*" --rest true --graphql true
38+
add Bookmarks --config "dab-config.MsSql.json" --source "bookmarks" --permissions "anonymous:*" --rest true --graphql true
39+
add MappedBookmarks --config "dab-config.MsSql.json" --source "mappedbookmarks" --permissions "anonymous:*" --rest true --graphql true
3840
update GQLmappings --config "dab-config.MsSql.json" --map "__column1:column1,__column2:column2" --permissions "authenticated:*"
3941
update Publisher --config "dab-config.MsSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many
4042
update Publisher --config "dab-config.MsSql.json" --permissions "policy_tester_01:create,delete"
@@ -126,3 +128,5 @@ update UpdateBookTitle --config "dab-config.MsSql.json" --permissions "authentic
126128
update Sales --config "dab-config.MsSql.json" --permissions "authenticated:*"
127129
update GetAuthorsHistoryByFirstName --config "dab-config.MsSql.json" --permissions "authenticated:execute"
128130
update InsertAndDisplayAllBooksUnderGivenPublisher --config "dab-config.MsSql.json" --permissions "authenticated:execute"
131+
update Bookmarks --config "dab-config.MsSql.json" --permissions "authenticated:*"
132+
update MappedBookmarks --config "dab-config.MsSql.json" --permissions "authenticated:*" --map "id:bkid,bkname:name"

config-generators/mysql-commands.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;Allow User Variables=true;uid=root;pwd=REPLACEME" --host-mode Development --cors-origin "http://localhost:5000"
1+
init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;uid=root;pwd=REPLACEME" --host-mode Development --cors-origin "http://localhost:5000"
22
add Publisher --config "dab-config.MySql.json" --source publishers --permissions "anonymous:read"
33
add Stock --config "dab-config.MySql.json" --source stocks --permissions "anonymous:create,read,update"
44
add Book --config "dab-config.MySql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books"
@@ -25,6 +25,8 @@ add ArtOfWar --config "dab-config.MySql.json" --source "aow" --rest true --graph
2525
add series --config "dab-config.MySql.json" --source "series" --permissions "anonymous:*"
2626
add Sales --config "dab-config.MySql.json" --source "sales" --permissions "anonymous:*" --rest true --graphql true
2727
add GQLmappings --config "dab-config.MySql.json" --source "GQLmappings" --permissions "anonymous:*" --rest true --graphql true
28+
add Bookmarks --config "dab-config.MySql.json" --source "bookmarks" --permissions "anonymous:*" --rest true --graphql true
29+
add MappedBookmarks --config "dab-config.MySql.json" --source "mappedbookmarks" --permissions "anonymous:*" --rest true --graphql true
2830
update GQLmappings --config "dab-config.MySql.json" --map "__column1:column1,__column2:column2" --permissions "authenticated:*"
2931
update Publisher --config "dab-config.MySql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many
3032
update Publisher --config "dab-config.MySql.json" --permissions "policy_tester_01:create,delete"
@@ -107,3 +109,5 @@ update Journal --config "dab-config.MySql.json" --permissions "policy_tester_upd
107109
update Journal --config "dab-config.MySql.json" --permissions "authorizationHandlerTester:read"
108110
update ArtOfWar --config "dab-config.MySql.json" --permissions "authenticated:*" --map "DetailAssessmentAndPlanning:始計,WagingWar:作戰,StrategicAttack:謀攻,NoteNum:┬─┬ノ( º _ ºノ)"
109111
update Sales --config "dab-config.MySql.json" --permissions "authenticated:*"
112+
update Bookmarks --config "dab-config.MySql.json" --permissions "authenticated:*"
113+
update MappedBookmarks --config "dab-config.MySql.json" --permissions "authenticated:*" --map "id:bkid,bkname:name"

config-generators/postgresql-commands.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ add ArtOfWar --config "dab-config.PostgreSql.json" --source "aow" --rest true --
2525
add series --config "dab-config.PostgreSql.json" --source "series" --permissions "anonymous:*"
2626
add Sales --config "dab-config.PostgreSql.json" --source "sales" --permissions "anonymous:*" --rest true --graphql true
2727
add GQLmappings --config "dab-config.PostgreSql.json" --source "gqlmappings" --permissions "anonymous:*" --rest true --graphql true
28+
add Bookmarks --config "dab-config.PostgreSql.json" --source "bookmarks" --permissions "anonymous:*" --rest true --graphql true
29+
add MappedBookmarks --config "dab-config.PostgreSql.json" --source "mappedbookmarks" --permissions "anonymous:*" --rest true --graphql true
2830
update GQLmappings --config "dab-config.PostgreSql.json" --map "__column1:column1,__column2:column2" --permissions "authenticated:*"
2931
update Publisher --config "dab-config.PostgreSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many
3032
update Publisher --config "dab-config.PostgreSql.json" --permissions "policy_tester_01:create,delete"
@@ -104,3 +106,5 @@ update Journal --config "dab-config.PostgreSql.json" --permissions "policy_teste
104106
update Journal --config "dab-config.PostgreSql.json" --permissions "authorizationHandlerTester:read"
105107
update ArtOfWar --config "dab-config.PostgreSql.json" --permissions "authenticated:*" --map "DetailAssessmentAndPlanning:始計,WagingWar:作戰,StrategicAttack:謀攻,NoteNum:┬─┬ノ( º _ ºノ)"
106108
update Sales --config "dab-config.PostgreSql.json" --permissions "authenticated:*"
109+
update Bookmarks --config "dab-config.PostgreSql.json" --permissions "authenticated:*"
110+
update MappedBookmarks --config "dab-config.PostgreSql.json" --permissions "authenticated:*" --map "id:bkid,bkname:name"

docs/configuration-file.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,27 @@ The configuration file has a `$schema` property as the first property in the con
7878
"$schema": "..."
7979
```
8080

81-
From version 0.4.11-alpha schema is available at:
81+
From version 0.3.7-alpha schema is available at:
8282

8383
```txt
84-
https://dataapibuilder.azureedge.net/schemas/<VERSION>-<suffix>/dab.draft.schema.json
84+
https://github.com/Azure/data-api-builder/releases/download/<VERSION>-<suffix>/dab.draft.schema.json
8585
```
8686

8787
make sure to replace the **VERSION-suffix** placeholder with the version you want to use, for example:
8888

8989
```txt
90-
https://dataapibuilder.azureedge.net/schemas/v0.4.11-alpha/dab.draft.schema.json
90+
https://github.com/Azure/data-api-builder/releases/download/v0.3.7-alpha/dab.draft.schema.json
91+
```
92+
93+
If there are no suffix, then simply ignore it, for example:
94+
```txt
95+
https://github.com/Azure/data-api-builder/releases/download/v0.5.34/dab.draft.schema.json
96+
```
97+
98+
the **latest** version of the schema is always available at
99+
100+
```txt
101+
https://github.com/Azure/data-api-builder/releases/latest/download/dab.draft.schema.json
91102
```
92103

93104
### Data Source
@@ -585,7 +596,7 @@ This is a sample config file to give an idea of how the json config consumed by
585596

586597
```json
587598
{
588-
"$schema": "https://dataapibuilder.azureedge.net/schemas/v0.5.0-beta/dab.draft.schema.json",
599+
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v{dab-version}/dab.draft.schema.json",
589600
"data-source": {
590601
"database-type": "mssql",
591602
"connection-string": "Server=localhost;Database=PlaygroundDB;User ID=PlaygroundUser;Password=ReplaceMe;TrustServerCertificate=false;Encrypt=True"

docs/getting-started/getting-started-azure-postgresql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The command will generate a config file called `dab-config.json` which looks lik
5555

5656
```json
5757
{
58-
"$schema": "https://dataapibuilder.azureedge.net/schemas/v{dab-version}/dab.draft.schema.json",
58+
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v{dab-version}/dab.draft.schema.json",
5959
"data-source": {
6060
"database-type": "postgresql",
6161
"connection-string": "Server=ReplaceMe.postgres.database.azure.com;Database=PlaygroundDB;User ID=ReplaceMe;Password=ReplaceMe;Ssl Mode=Require;"

docs/getting-started/getting-started-azure-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The command will generate a config file called `dab-config.json` looking like th
4646

4747
```json
4848
{
49-
"$schema": "dab.draft-01.schema.json",
49+
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v{dab-version}/dab.draft.schema.json",
5050
"data-source": {
5151
"database-type": "mssql",
5252
"connection-string": "Server=localhost;Database=PlaygroundDB;User ID=PlaygroundUser;Password=ReplaceMe;TrustServerCertificate=true"

docs/getting-started/getting-started-mysql-db.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The command will generate a config file called dab-config.MySql.json looking lik
4646
4747
```json
4848
{
49-
"$schema": "dab.draft-01.schema.json",
49+
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v{dab-version}/dab.draft.schema.json",
5050
"data-source": {
5151
"database-type": "mysql",
5252
"connection-string": "Server=demoazuredbmysql.mysql.database.azure.com;User ID=dbusername;Password=<Password>;database=<dbname>;Sslmode=Required;SslCa=<path-to-SSLcert>"

docs/whats-new-0.3.7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Details on how to install the latest version are here: [Installing DAB CLI](./ge
1616
JSON Schema has been published here:
1717

1818
```text
19-
https://dataapibuilder.azureedge.net/schemas/v0.3.7-alpha/dab.draft.schema.json
19+
https://github.com/Azure/data-api-builder/releases/download/v0.3.7-alpha/dab.draft.schema.json
2020
```
2121

2222
This will give you intellisense if you are using an IDE, like VS Code, that supports JSON Schemas. Take a look at `basic-empty-dab-config.json` in the `samples` folder, to have a starting point when manually creating the `dab-config.json` file.

0 commit comments

Comments
 (0)