Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2ba3fdc
dpg sdk automation doc
dw511214992 May 18, 2022
d904a54
dpg sdk automation doc
dw511214992 May 18, 2022
bec77ac
dpg sdk automation doc
dw511214992 May 18, 2022
bf831b8
dpg sdk automation doc
dw511214992 May 18, 2022
65a0d89
dpg doc
dw511214992 May 18, 2022
6cae89d
delete useless info
dw511214992 May 18, 2022
329ac00
add faq
dw511214992 May 18, 2022
0f9e4e4
tune figure
dw511214992 May 18, 2022
367b39a
tune figure
dw511214992 May 18, 2022
2a6dce3
multi-client
dw511214992 May 19, 2022
c35f3af
multi-client
dw511214992 May 19, 2022
6ee2983
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
eb533c0
change based on comment
dw511214992 May 20, 2022
17d127f
change based on comment
dw511214992 May 20, 2022
0781370
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
55743d9
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
72c48d9
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
0209e7b
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
737e73c
change based on comment
dw511214992 May 20, 2022
5b82df0
Update documentation/onboard-dpg-in-sdkautomation/README.md
dw511214992 May 20, 2022
30579af
add sample readme.md for js
dw511214992 May 23, 2022
46fde0b
Merge remote-tracking branch 'origin/dpg-doc' into dpg-doc
dw511214992 May 23, 2022
419c4e3
change dpg/prNumber to swagger/prNumber
dw511214992 May 23, 2022
2cb8fca
fix
dw511214992 May 23, 2022
e1578dd
add info
dw511214992 May 23, 2022
525bc58
add info
dw511214992 May 23, 2022
c474365
Merge remote-tracking branch 'origin/main' into dpg-doc
dw511214992 May 23, 2022
a5d6180
save autorest configuration in PR comment
dw511214992 May 26, 2022
8af548e
add swagger-to-sdk
dw511214992 May 26, 2022
312072f
update png
dw511214992 May 26, 2022
34932aa
add autorest config in spec comment
dw511214992 Jun 6, 2022
a572d19
add autorest config in spec comment
dw511214992 Jun 6, 2022
8292f9e
add autorest config in spec comment
dw511214992 Jun 6, 2022
87ff86c
add autorest config in spec comment
dw511214992 Jun 6, 2022
4161367
add autorest config in spec comment
dw511214992 Jun 6, 2022
a27da1c
add autorest config in spec comment
dw511214992 Jun 6, 2022
e9065af
add autorest config in spec comment
dw511214992 Jun 6, 2022
829a7fc
change doc
dw511214992 Jun 6, 2022
18f62ae
change doc
dw511214992 Jun 6, 2022
79cf46b
add more details to doc
dw511214992 Jun 7, 2022
bc4203a
add more details to doc
dw511214992 Jun 7, 2022
124a945
add more details to doc
dw511214992 Jun 7, 2022
047adaf
Update README.md
dw511214992 Jun 8, 2022
d502ec8
Update README.md
dw511214992 Jun 8, 2022
399e226
Update README.md
dw511214992 Jun 8, 2022
5eab993
Update README.md
dw511214992 Jun 8, 2022
db89d60
add more details to doc
dw511214992 Jun 10, 2022
a3aa527
Merge remote-tracking branch 'origin/dpg-doc' into dpg-doc
dw511214992 Jun 10, 2022
62058b3
add more details to doc
dw511214992 Jun 13, 2022
c8dc04f
Update README.md
dw511214992 Jun 16, 2022
7018337
Update README.md
dw511214992 Jun 16, 2022
e368647
Update README.md
dw511214992 Jun 16, 2022
026d881
Update README.md
dw511214992 Jun 16, 2022
c289d11
Update add-autorest-configuration-in-spec-comment.md
dw511214992 Jul 5, 2022
65352b8
Update README.md
dw511214992 Jul 8, 2022
bca0dfc
Update README.md
dw511214992 Jul 8, 2022
f7ff4ac
Update README.md
dw511214992 Jul 8, 2022
f793195
Update README.md
dw511214992 Jul 8, 2022
fe418c6
update doc
dw511214992 Jul 26, 2022
8632eca
change schema
dw511214992 Jul 28, 2022
33d17f0
doc fix
dw511214992 Jul 29, 2022
e4dfc83
add FAQ
dw511214992 Jul 29, 2022
5b76c17
add FAQ
dw511214992 Jul 29, 2022
9d13a11
add more details
dw511214992 Jul 29, 2022
6b21d43
add more details
dw511214992 Jul 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add sample readme.md for js
  • Loading branch information
dw511214992 committed May 23, 2022
commit 30579af7a839584afc2c38d28f13994c68f20996
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ There should be a basic readme.md together with swagger, and you can refer to th
//TODO

## Add Autorest Configuration for JS SDK
//TODO
The autorest configuration file `README.md` should be in `azure-sdk-for-js-<pr>/sdk/[[ServiceName]]/[[PackageFolderName]]/swagger/README.md`.
- `[[ServiceName]]`: It's recommended to keep it same as the one under `specification` in swagger repository.
- `[[PackageFolderName]]`: The package name of dataplane js sdk should be in format `xxx-rest`, which ends with `-rest`.
If the package is single client (only contains one swagger file), please refer to [Sample JS README.md for Single Client](js/singleClientREADMESample.md) to write README.md.
If the package is multi client (contains more than one swagger file), please refer to [Sample JS README.md for Multi Client](js/multiClientREADMESample.md)to write README.md.
1 change: 0 additions & 1 deletion documentation/onboard-dpg-in-sdkautomation/js/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# JS

- Please add parameter `--multi-client` in running autorest to generate codes.
- `[[PackageName]]`: It must start with `@azure-rest/`. If the `[[PackageFolder]]` which is `database-rest`, the `[[PackageName]]` should be `@azure-rest/database`.
- `[[PackageVersion]]`: It is the version of sdk you want to generate. For example: `1.0.0-beta.1`.
- `[[CredentialScopes]]`: It should be same as the `[[SecurityScopes]]` in `readme.md`.
- `[[TAG_1]]`/`[[TAG_1]]`: The tag to generate sub-client. For example: `database1`/`database2`.
- `[[Title_1]]`/`[[Title_2]]`: The client name of generate codes.
- `[[Description_1]]`/`[[Description_2]]`: It describes the sdk. For example: `Database Client 1`/`Database Client 2`.
- `[[Package_1]]`/`[[Package_2]]`: The sub-folder of generated codes. For example: `database1`/`database2`.
- `[[PathToSwaggerFile_1]]`/`[[PathToSwaggerFile_2]]`: The path to swagger file. For example: `https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/database/data-plane/Azure.Database/stable/2022-07-01/database1.json`

## Configuration

```yaml $(multi-client)
package-name: [[PackageName]]
generate-metadata: true
license-header: MICROSOFT_MIT_NO_VERSION
output-folder: ../
source-code-folder-path: ./src
batch:
- [[TAG_1]]
- [[TAG_2]]
package-version: [[PackageVersion]]
rest-level-client: true
add-credentials: true
credential-scopes: [[CredentialScopes]]
use-extension:
"@autorest/typescript": "6.0.0-beta.19"
```


```yaml $([[TAG_1]]) == true
title: [[Title_1]]
description: [[Description_1]]
output-folder: ../src/[[Package_1]]
source-code-folder-path: ./
input-file: [[PathToSwaggerFile_1]]
```

```yaml $([[TAG_2]]) == true
title: [[Title_2]]
description: [[Description_2]]
output-folder: ../src/[[Package_2]]
source-code-folder-path: ./
input-file: [[PathToSwaggerFile_2]]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# JS

- `[[PackageName]]`: It must start with `@azure-rest/`. If the `[[PackageFolder]]` which is `database-rest`, the `[[PackageName]]` should be `@azure-rest/database`.
- `[[Description]]`: It describes the sdk. For example: `Database Client`.
- `[[PackageVersion]]`: It is the version of sdk you want to generate. For example: `1.0.0-beta.1`.
- `[[CredentialScopes]]` It should be same as the `[[SecurityScopes]]` in `readme.md`.
- `[[PathToReadmeMdInSwaggerRepo]]`: It's the path to the `readme.md` file in swagger repository. For example: `https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/database/data-plane/readme.md`

## Configuration

```yaml
package-name: [[PackageName]]
description: [[Description]]
generate-metadata: true
license-header: MICROSOFT_MIT_NO_VERSION
output-folder: ../
source-code-folder-path: ./src
require:
- [[PathToReadmeMdInSwaggerRepo]]
package-version: [[PackageVersion]]
rest-level-client: true
add-credentials: true
credential-scopes: [[CredentialScopes]]
use-extension:
"@autorest/typescript": "6.0.0-beta.19"
```
3 changes: 3 additions & 0 deletions documentation/samplefiles-dp/samplereadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ These are the global settings for the [[ServiceName]].
```yaml
openapi-type: [[OpenApiType]]
tag: package-[[Version]]
title: [[Title]]
security: AADToken
security-scopes: [[SecurityScopes]]
```

### Tag: package-[[Version]]
Expand Down