* Typo fix

* Update wordings
This commit is contained in:
Mary Gao 2022-11-18 16:41:28 +08:00 коммит произвёл GitHub
Родитель 6737306c2e
Коммит 8be94e7d67
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -5,6 +5,7 @@ Getting Started - Generate the RLC rest-level client libraries with Swagger
Please refer to this [link](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md#prerequisites) for the environment set up prerequisites in azure-sdk-for-js repository. We highly recommand to read [this blog](https://devblogs.microsoft.com/azure-sdk/azure-rest-libraries-for-javascript/) to get familiar with REST libraries for JavaScript.
:warning: Note: if youre generating from Cadl with RLC, please read [this doc](./RLC-quickstart.md) for Cadl specific details.
# Project folder and name convention
@ -144,7 +145,7 @@ A minimal README.md is generated by our codegen and you could improve it with mo
In order to release it, we need to add some tests for it to make sure we are delivering high quality packages. But before we add the test, we need to add a `generate-test: true` make the codegen generate the necessary change in `package.json` and `tsconfig.json` so that test framework can work. Once the generation finished, you will see a `sampleTest.spec.ts` file in your `{PROJECT_ROOT}/test/public` folder, which only has an empty test and you may change them into test against your own services.
See the [Javascript Codegen Quick Start for Test](./Quickstart-on-how-to-write-tests.md) for information on how to write and run tests for the Javascript SDK.
See the [JavaScript Codegen Quick Start for Test](./Quickstart-on-how-to-write-tests.md) for information on how to write and run tests for the JavaScript SDK.
1. **Prerequisites**
@ -183,7 +184,7 @@ See the [Javascript Codegen Quick Start for Test](./Quickstart-on-how-to-write-t
If you enable `generate-sample: true` option the codegen would do two things for you:
- Add samples metadata in `tsconfig.json` and `package.json`
- Generate a collection of Typescript sample files (based on x-ms-examples in OpenAPI specs) under `samples-dev` folder.
- Generate a collection of TypeScript sample files (based on x-ms-examples in OpenAPI specs) under `samples-dev` folder.
Please notice that the generated samples might not be directly usable as runnable codes, however we could get the basic idea on how code works, and update them to be more valuable samples.
@ -214,6 +215,9 @@ And we could use `lint:fix` if there are any errors.
```shell
cd ${PROJECT_ROOT} && rushx lint:fix
```
# How to do customizations
You may want to do your customizations based on generated code. We collect some common customization cases and you can read [Customization on the RLC rest-level client libraries](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md) for more details.
# How to create package

Просмотреть файл

@ -25,9 +25,9 @@ If you are the first time to prepare the SDK, please follow the Azure SDK guidan
We are working on to automatically generate everything right now, but currently we still need some manual work to get a releasable package. Here're the steps of how to get the package.
1. **Add Typescript emitter dependency in package.json**
1. **Add TypeScript emitter dependency in package.json**
In Cadl project, modify `package.json` to add dependency for Typescript emitter, then run `npm install` again to install `@azure-tools/cadl-typescript`.
In Cadl project, modify `package.json` to add dependency for TypeScript emitter, then run `npm install` again to install `@azure-tools/cadl-typescript`.
```json
"dependencies": {
@ -43,7 +43,7 @@ We are working on to automatically generate everything right now, but currently
---
1. **Configure Typescript emitter in cadl-project.yaml**
1. **Configure TypeScript emitter in cadl-project.yaml**
In Cadl project, modify (or create) `cadl-project.yaml` and configure the SDK generated, using the emitter options on `@azure-tools/cadl-typescript`
@ -205,9 +205,8 @@ cd ${PROJECT_ROOT} && rushx lint:fix
```
# How to do customizations
There is many information about the SDK that AutoRest will never know, so you may want to do your customizations based on generated code.
We collect some common customization cases and you can read [Customization on the RLC rest-level client libraries](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md) for more details.
You may want to do your customizations based on generated code. We collect some common customization cases and you can read [Customization on the RLC rest-level client libraries](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md) for more details.
# How to create package