You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you download the Client SDK for typescript-fetch and attempt to use it in a standard application, the API responses' models don't match to the fetch requests being made primarily due to case issues:
For example this code expects the Endpoint response to include "id" but the server returns "Id"
const endpointsClient = new EndpointsApi(
{
apiKey: Config.PORTAINER_API_KEY,
},
Config.PORTAINER_URL + "/api",
fetch
);
const environmentName = `${currentUser.username}/${new Date().toISOString()}`;
const environment = await endpointsClient.endpointCreate(
environmentName,
4,
"",
Config.PORTAINER_URL
);
console.log(environment.id); // => returns undefined
console.log(environment.Id); // => returns the correct value if updated in the model otherwise this throws a Property 'Id' does not exist on type 'PortainerEndpoint'. Did you mean 'id'?
I believe something is wrong in the CodeGen output or I am using Swagger incorrectly.
Thank you!
The text was updated successfully, but these errors were encountered:
When you download the Client SDK for typescript-fetch and attempt to use it in a standard application, the API responses' models don't match to the fetch requests being made primarily due to case issues:
For example this code expects the Endpoint response to include "id" but the server returns "Id"
I believe something is wrong in the CodeGen output or I am using Swagger incorrectly.
Thank you!
The text was updated successfully, but these errors were encountered: