openapi_client.paths

Undocumented in source.

Members

Classes

RequestBodyType
class RequestBodyType

Information about the request body for an OasOperation.

ResponseHandlerType
class ResponseHandlerType
Undocumented in source.

Functions

generateModuleFooter
void generateModuleFooter(Appender!string buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
generateModuleHeader
void generateModuleHeader(Appender!string buffer, string packageRoot, string moduleName)

Writes the beginning of a class file for a service that can access a REST API.

generateModuleImports
void generateModuleImports(Appender!string buffer, PathEntry[] pathEntries, string packageRoot)

Dive through the PathEntries and extract a list of needed imports.

generatePathItemMethods
void generatePathItemMethods(Appender!string buffer, string path, OasPathItem pathItem, string prefix)
Undocumented in source. Be warned that the author may not have intended to support it.
generateRequestBodyType
RequestBodyType generateRequestBodyType(Appender!string buffer, OperationEntry operationEntry, string prefix)

Determine what type the RequestBody is for a request, and if needed, generated.

generateRequestParamType
string generateRequestParamType(Appender!string buffer, OperationEntry operationEntry, string prefix)
Undocumented in source. Be warned that the author may not have intended to support it.
generateResponseHandlerType
ResponseHandlerType generateResponseHandlerType(Appender!string buffer, OperationEntry operationEntry, string prefix)

Based on the request responses and their types, generate a "response handler" class that allows the caller to define handlers that are specific to the response type.

getPathItemOperationEntries
OperationEntry[] getPathItemOperationEntries(OasPathItem pathItem)
Undocumented in source. Be warned that the author may not have intended to support it.
writePathFiles
void writePathFiles(OasDocument oasDocument, string targetDir, string packageRoot)

Given the paths in an OpenApi Specification Document, produce D-language code that can perform REST requests to communicate with the API. Depending on the architecture concepts being used, these files are the equivalent to a "service" or a "gateway" class.

Structs

OperationEntry
struct OperationEntry
Undocumented in source.
PathEntry
struct PathEntry
Undocumented in source.

Meta