Julia API server for BmiServer
OpenAPI specification for the Basic Modeling Interface (BMI). All functions are described on the BMI homepage.
Overview
This API server was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
- API version: 2.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.JuliaServerCodegen
For more information, please visit https://www.ewatercycle.org/contact/
Installation
Place the Julia files generated under the src
folder in your Julia project. Include BmiServer.jl in the project code. It would include the module named BmiServer.
Implement the server methods as listed below. They are also documented with the BmiServer module. Launch a HTTP server with a router that has all handlers registered. A register
method is provided in BmiServer module for convenience.
register(
router::HTTP.Router, # Router to register handlers in
impl; # Module that implements the server methods
path_prefix::String="", # Prefix to be applied to all paths
optional_middlewares... # Optional middlewares to be applied to all handlers
)
Optional middlewares can be one or more of:
init
: called before the request is processedpre_validation
: called after the request is parsed but before validationpre_invoke
: called after validation but before the handler is invokedpost_invoke
: called after the handler is invoked but before the response is sent
The order in which middlewares are invoked are: init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke
API Endpoints
The following server methods must be implemented:
Class | Method | HTTP request | Description |
---|---|---|---|
ExchangeItemsApi | getcomponentname | GET /getcomponentname | |
ExchangeItemsApi | getinputitem_count | GET /getinputitem_count | |
ExchangeItemsApi | getinputvar_names | GET /getinputvar_names | |
ExchangeItemsApi | getoutputitem_count | GET /getoutputitem_count | |
ExchangeItemsApi | getoutputvar_names | GET /getoutputvar_names | |
GettersApi | get_value | GET /get_value/{name} | |
GettersApi | getvalueat_indices | POST /getvalueat_indices/{name} | |
GridInformationApi | getgridrank | GET /getgridrank/{grid} | |
GridInformationApi | getgridsize | GET /getgridsize/{grid} | |
GridInformationApi | getgridtype | GET /getgridtype/{grid} | |
IRFApi | finalize | DELETE /finalize | |
IRFApi | initialize | POST /initialize | |
IRFApi | update | POST /update | |
IRFApi | update_until | POST /update_until | |
NURCApi | getgridx | GET /getgridx/{grid} | |
NURCApi | getgridy | GET /getgridy/{grid} | |
NURCApi | getgridz | GET /getgridz/{grid} | |
SettersApi | set_value | POST /set_value/{name} | |
SettersApi | setvalueat_indices | POST /setvalueat_indices/{name} | |
TimeInformationApi | getcurrenttime | GET /getcurrenttime | |
TimeInformationApi | getendtime | GET /getendtime | |
TimeInformationApi | getstarttime | GET /getstarttime | |
TimeInformationApi | gettimestep | GET /gettimestep | |
TimeInformationApi | gettimeunits | GET /gettimeunits | |
UniformRectilinearApi | getgridorigin | GET /getgridorigin/{grid} | |
UniformRectilinearApi | getgridshape | GET /getgridshape/{grid} | |
UniformRectilinearApi | getgridspacing | GET /getgridspacing/{grid} | |
UnstructuredApi | getgridedge_count | GET /getgridedge_count/{grid} | |
UnstructuredApi | getgridedge_nodes | GET /getgridedge_nodes/{grid} | |
UnstructuredApi | getgridface_count | GET /getgridface_count/{grid} | |
UnstructuredApi | getgridface_edges | GET /getgridface_edges/{grid} | |
UnstructuredApi | getgridface_nodes | GET /getgridface_nodes/{grid} | |
UnstructuredApi | getgridnode_count | GET /getgridnode_count/{grid} | |
UnstructuredApi | getgridnodesperface | GET /getgridnodesperface/{grid} | |
VariableInformationApi | getvargrid | GET /getvargrid/{name} | |
VariableInformationApi | getvaritemsize | GET /getvaritemsize/{name} | |
VariableInformationApi | getvarlocation | GET /getvarlocation/{name} | |
VariableInformationApi | getvarnbytes | GET /getvarnbytes/{name} | |
VariableInformationApi | getvartype | GET /getvartype/{name} | |
VariableInformationApi | getvarunits | GET /getvarunits/{name} |
Models
- GetComponentNameResponse
- GetGridTypeResponse
- GetTimeUnitsResponse
- GetVarLocationResponseLocation
- GetVarTypeResponse
- GetVarUnitsResponse
- InitializeRequest
- ProblemDetails
- SetValueAtIndicesRequest