Closed
Description
Description
Thank you for this wonderful project, it really strikes a fantastic balance between opinionated structure and flexibility 🎊
I'm looking for a way to take advantage of the SDK plugin, but with the ability to modify/define my own method structure. For example, a path defined like so:
/items/{id}:
put:
operationId: UpdateItem
parameters:
- description: item id
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
name:
type: string
description:
type: string
price:
type: number
required:
- name
- description
would result in a call structure like this with the current sdk gen:
updateAsset({
path: {
id: "123",
},
body: {
name: "test",
description: "some description",
},
});
but I'm hoping to structure my sdk something like:
updateAsset("123", { name: "test", description: "some description"})
Obviously there are extensive scenarios here for how to handle different properties. I'm mostly wondering if there's a recommended approach to writing my own/extending the current @hey-api/sdk package in some way.
Thank you!