microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
63dce6b8a5ec2b25b203f52f4fe376f352ea51f4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/libraries/rest/cheat-sheet.md

12lines · modepreview

---
title: Cheat sheet
---

## Resource Routing

_Details: [Resource Routing](./resource-routing.md)_

| Feature                  | Example                                                                             | Resolved Route |
| ------------------------ | ----------------------------------------------------------------------------------- | -------------- |
| Auto route               | `@autoRoute op get(@segment("pets") @path id: string): void`                        | `/pets/{id}`   |
| Custom segment seperator | `@autoRoute op get(@segment("pets") @path @segmentSeparator(":") id: string): void` | `:pets/{id}`   |