Files
herolib/examples/hero/generation/openapi_generation
2025-02-19 09:46:41 +03:00
..
2024-12-31 11:00:02 +01:00
...
2025-01-31 15:39:44 +03:00
...
2024-12-27 17:06:08 +01:00
...
2025-01-31 15:39:44 +03:00

Hero Generation Example

Getting started

Step 1: Generate specification

Step 2: Generate actor from specification

The script below generates the actor's OpenAPI handler from a given OpenAPI Specification. The generated code is written to handler.v in the example actor's module.

generate_actor.vsh

Step 3: Run actor

The script below runs the actor's Redis RPC Queue Interface and uses the generated handler function to handle incoming RPCs. The Redis Interface listens to the RPC Queue assigned to the actor.

run_interface_procedure.vsh

Step 3: Run server

The script below runs the actor's RPC Queue Listener and uses the generated handler function to handle incoming RPCs.

run_interface_openapi.vsh