-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodeSamples.yaml
More file actions
41 lines (41 loc) · 2.81 KB
/
Copy pathcodeSamples.yaml
File metadata and controls
41 lines (41 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
overlay: 1.0.0
info:
title: CodeSamples overlay for typescript target
version: 0.0.0
actions:
- target: $["paths"]["/pet/findByTags"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await petstore.pet.findPetsByTags({});\n\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/pet/{petId}"]["delete"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await petstore.pet.deletePet({\n petId: 818965,\n });\n\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/pet/{petId}"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await petstore.pet.getPetByIDS({\n petId: 327430,\n });\n\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/user/{username}"]["delete"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await petstore.user.deleteUser({\n username: \"Rita_Schuppe\",\n });\n\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/user/{username}"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await petstore.user.getUserByName({\n username: \"Edyth10\",\n });\n\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/user/{username}"]["put"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "Typescript"
"source": "import { Petstore } from \"meep-moop\";\n\nconst petstore = new Petstore({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n await petstore.user.updateUser({\n username: \"Alison.Cassin\",\n user: {\n id: 10,\n username: \"theUser\",\n firstName: \"John\",\n lastName: \"James\",\n email: \"john@email.com\",\n password: \"12345\",\n phone: \"12345\",\n userStatus: 1,\n },\n });\n\n\n}\n\nrun();"