DefaultMethodParser
Functions
Link copied to clipboard
Uses the built-in Ktor route path Route.toString but cuts out any meta route such as authentication... anything that matches the RegEx pattern /\\(.+\\)
Link copied to clipboard
Allows the reflection invoker to populate a parameter map with values in order to sus out any default parameters.
Link copied to clipboard
open fun getDefaultParameterValue(clazz: KClass<*>, prop: KProperty<*>): Any?
Content copied to clipboard
Absolutely disgusting reflection to determine if a default value is available for a given property.
Link copied to clipboard
open fun Set<ParameterExample>.mapToSpec(parameterName: String): Map<String, Parameter.Example>?
Content copied to clipboard
Link copied to clipboard
open fun parseExceptions(exceptionInfo: Set<ExceptionInfo<*>>, feature: Kompendium): Map<Int, Response>
Content copied to clipboard
Link copied to clipboard
open fun parseMethodInfo(info: MethodInfo<*, *>, paramType: KType, requestType: KType, responseType: KType, feature: Kompendium): PathOperation
Content copied to clipboard
Generates the OpenAPI Path spec from provided metadata
Link copied to clipboard
open fun parseResponse(responseType: KType, responseInfo: ResponseInfo<*>?, feature: Kompendium): Map<Int, Response>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun KProperty<*>.toParameter(info: MethodInfo<*, *>, parentType: KType, parentClazz: KClass<*>, feature: Kompendium): Parameter
Content copied to clipboard
Link copied to clipboard
open fun KType.toParameterSpec(info: MethodInfo<*, *>, feature: Kompendium): List<Parameter>
Content copied to clipboard
Parses a type for all parameter information. All fields in the receiver must be annotated with io.bkbn.kompendium.annotations.Param.
Link copied to clipboard
open fun KType.toRequestSpec(requestInfo: RequestInfo<*>?, feature: Kompendium): Request?
Content copied to clipboard
Link copied to clipboard
open fun KType.toResponseSpec(responseInfo: ResponseInfo<*>?, feature: Kompendium): Pair<Int, Response>?
Content copied to clipboard