Files
herolib/libarchive/baobab/generator/generate_openrpc_test.v
2025-10-12 12:30:19 +03:00

39 lines
652 B
V

module generator
import incubaid.herolib.develop.codetools as code { Function, Param, Result, Struct, Type }
import incubaid.herolib.schemas.openrpc
const test_actor_specification = ActorSpecification{
methods: [
ActorMethod{
func: Function{
name: 'get_object'
params: [
Param{
name: 'id'
typ: Type{
symbol: 'int'
}
},
]
result: Result{
typ: Type{
symbol: 'Object'
}
}
}
},
]
objects: [BaseObject{
structure: Struct{
name: 'Object'
}
}]
}
pub fn test_generate_openrpc() ! {
actor := Actor{}
object := generate_openrpc(actor)
panic(object.encode()!)
}