StefanSchade / TaleForge

Text Adventure Logic Engine - A plattform to create immersive games without coding
0 stars 0 forks source link

Connect Backend via OpenAPI #46

Open StefanSchade opened 5 months ago

StefanSchade commented 5 months ago

Commit

install openapi cli tool

npm install @openapitools/openapi-generator-cli --save-dev

Once installed, you can use the openapi-generator-cli to generate client code. Here’s a brief on the command:

-i your-openapi-spec.yaml: This specifies the input OpenAPI specification file. Replace your-openapi-spec.yaml with the path to your actual OpenAPI YAML or JSON file. -g typescript-fetch: This specifies the generator to use. In this case, it generates a TypeScript client using the fetch API. -o src/api: This specifies the output directory where the generated code will be saved.

setup the openapi spec