This is a basic Vite React TypeScript client SPA (Single Page Application) that can display data about the finnish power grid.
This serves as an example of how to generate an API in TypeScript from an OpenAPI specification and also using the generated API.
A Node.js proxy in vite.config.js is used to adhere to the CORS policy at the end server.
You need an API key to be able to use this client.
npm install
npm run dev
The API in TypeScript was generated with the following command (no need to run this again):
# openapi-generator-cli generate -i avoindata-api.json -g typescript-fetch -o ./generated-api
npm run generate-api