Very confused about the default usage #607
-
After the quick start and running I see the examples in this repository, but they seem to have additional dependencies, etc. I just want to use the basic generated code with fetch. Is that possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hey @markedwards, did you see the demo linked in docs? |
Beta Was this translation helpful? Give feedback.
-
I was (am) pretty confused how the "client" has to be used. I think it would really had helped me if the Quick start includes a basic usage of the generated code as well. This would provide a basic start to finish for new users. If the user has a basic understanding how the generated code works its normally pretty easy to adopt more advanced ways / options. As fetch seems to be a good common usage what do you think about adding a section above UsageOne way of using your newly created client is by using a service function like import { addPet } from './client/services.gen';
const { data, error } = await addPet({
body: {
id: 0,
name: 'Pluto',
status: 'available',
},
});
if (error) {
console.log(error);
return;
} More clients and ways to use the generated code can be found ... |
Beta Was this translation helpful? Give feedback.
Hey @markedwards, did you see the demo linked in docs?