autorest.typescript/packages/rlc-common/CONTRIBUTING.md

2.0 KiB

Contributing

we have a interfaces.ts to define the RLCModel And RLCOptions that is export for both Autorest RLC generator and TypeSpec emitters.

The generated Typescript/Javascript Rest Level Client has the following structure:

  1. Client (Handled by buildClient.ts)
  2. Client Definition (Handled by buildClientDefinitions.ts)
  3. Index File (Handled by buildIndexFile.ts)
  4. isUnexpectedHelper (Handled by buildIsUnexpectedHelper.ts) pollingHelper (Handled by buildPollingHelper.ts) paginateHelper (Handled by buildPaginateHelper.ts)
  5. Models (Handled by buildObjectTypes.ts and buildSchemaType.ts)
  6. Parameters (Handled by buildParameterTypes.ts)
  7. Responses (Handled by buildResponseTypes.ts)
  8. Parameters (Handled by parametersGenerator.ts)
  9. Metadata (Handled here)

Prerequisite

Please follow the Prerequisite part to install the dependencies.

Add a new feature

If there's a new feature request, Contributors can

  1. add properties in RLCModel and RLCOptions in interfaces.ts
  2. add the build logic about how the newly add properties is going to change the generation behavior.

Testing

We have added unit tests for this lib and you can debug them by following these steps.

How to debug an unit test case

  • We have set up a debugging profile for unit tests that you can use:
    1. Put breakpoints in your test or source code where you want to pause the execution
    2. Switch to the debugger tab on the left side
    3. Choose the "[RLC-Common] Debug Unit Test" profile from the dropdown menu
    4. Press the "Play" button to start debugging