breaking change: V3 alpha (#256)
This commit is contained in:
4
locations/Module.md
Normal file
4
locations/Module.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Module kompendium-locations
|
||||
|
||||
Adds support for Ktor [Locations](https://ktor.io/docs/locations.html) API. Any notarized location _must_ be provided
|
||||
with a `TParam` annotated with `@Location`. Nested Locations are supported
|
36
locations/build.gradle.kts
Normal file
36
locations/build.gradle.kts
Normal file
@ -0,0 +1,36 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("io.bkbn.sourdough.library.jvm")
|
||||
id("io.gitlab.arturbosch.detekt")
|
||||
id("com.adarshr.test-logger")
|
||||
id("org.jetbrains.dokka")
|
||||
id("maven-publish")
|
||||
id("java-library")
|
||||
id("signing")
|
||||
}
|
||||
|
||||
sourdoughLibrary {
|
||||
libraryName.set("Kompendium Locations")
|
||||
libraryDescription.set("Supplemental library for Kompendium offering support for Ktor's Location API")
|
||||
compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn"))
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// IMPLEMENTATION
|
||||
|
||||
implementation(projects.kompendiumCore)
|
||||
implementation("io.ktor:ktor-server-core:2.1.0")
|
||||
implementation("io.ktor:ktor-server-locations:2.1.0")
|
||||
|
||||
// TESTING
|
||||
|
||||
testImplementation(testFixtures(projects.kompendiumCore))
|
||||
}
|
||||
|
||||
testing {
|
||||
suites {
|
||||
named("test", JvmTestSuite::class) {
|
||||
useJUnitJupiter()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package io.bkbn.kompendium.locations
|
||||
|
||||
//import io.bkbn.kompendium.annotations.Param
|
||||
//import io.bkbn.kompendium.core.Kompendium
|
||||
//import io.bkbn.kompendium.core.metadata.method.MethodInfo
|
||||
//import io.bkbn.kompendium.core.parser.IMethodParser
|
||||
//import io.bkbn.kompendium.oas.path.Path
|
||||
//import io.bkbn.kompendium.oas.path.PathOperation
|
||||
//import io.bkbn.kompendium.oas.payload.Parameter
|
||||
//import io.ktor.application.feature
|
||||
//import io.ktor.locations.KtorExperimentalLocationsAPI
|
||||
//import io.ktor.locations.Location
|
||||
//import io.ktor.routing.Route
|
||||
//import io.ktor.routing.application
|
||||
//import kotlin.reflect.KAnnotatedElement
|
||||
//import kotlin.reflect.KClass
|
||||
//import kotlin.reflect.KClassifier
|
||||
//import kotlin.reflect.KType
|
||||
//import kotlin.reflect.full.createType
|
||||
//import kotlin.reflect.full.findAnnotation
|
||||
//import kotlin.reflect.full.hasAnnotation
|
||||
//import kotlin.reflect.full.memberProperties
|
||||
//
|
||||
//@OptIn(KtorExperimentalLocationsAPI::class)
|
||||
//object LocationMethodParser : IMethodParser {
|
||||
// override fun KType.toParameterSpec(info: MethodInfo<*, *>, feature: Kompendium): List<Parameter> {
|
||||
// val clazzList = determineLocationParents(classifier!!)
|
||||
// return clazzList.associateWith { it.memberProperties }
|
||||
// .flatMap { (clazz, memberProperties) -> memberProperties.associateWith { clazz }.toList() }
|
||||
// .filter { (prop, _) -> prop.hasAnnotation<Param>() }
|
||||
// .map { (prop, clazz) -> prop.toParameter(info, clazz.createType(), clazz, feature) }
|
||||
// }
|
||||
//
|
||||
// private fun determineLocationParents(classifier: KClassifier): List<KClass<*>> {
|
||||
// var clazz: KClass<*>? = classifier as KClass<*>
|
||||
// val clazzList = mutableListOf<KClass<*>>()
|
||||
// while (clazz != null) {
|
||||
// clazzList.add(clazz)
|
||||
// clazz = getLocationParent(clazz)
|
||||
// }
|
||||
// return clazzList
|
||||
// }
|
||||
//
|
||||
// private fun getLocationParent(clazz: KClass<*>): KClass<*>? {
|
||||
// val parent = clazz.memberProperties
|
||||
// .find { (it.returnType.classifier as KAnnotatedElement).hasAnnotation<Location>() }
|
||||
// return parent?.returnType?.classifier as? KClass<*>
|
||||
// }
|
||||
//
|
||||
// fun KClass<*>.calculateLocationPath(suffix: String = ""): String {
|
||||
// val locationAnnotation = this.findAnnotation<Location>()
|
||||
// require(locationAnnotation != null) { "Location annotation must be present to leverage notarized location api" }
|
||||
// val parent = this.java.declaringClass?.kotlin?.takeIf { it.hasAnnotation<Location>() }
|
||||
// val newSuffix = locationAnnotation.path.plus(suffix)
|
||||
// return when (parent) {
|
||||
// null -> newSuffix
|
||||
// else -> parent.calculateLocationPath(newSuffix)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// inline fun <reified TParam : Any> processBaseInfo(
|
||||
// paramType: KType,
|
||||
// requestType: KType,
|
||||
// responseType: KType,
|
||||
// info: MethodInfo<*, *>,
|
||||
// route: Route
|
||||
// ): LocationBaseInfo {
|
||||
// val locationAnnotation = TParam::class.findAnnotation<Location>()
|
||||
// require(locationAnnotation != null) { "Location annotation must be present to leverage notarized location api" }
|
||||
// val path = route.calculateRoutePath()
|
||||
// val locationPath = TParam::class.calculateLocationPath()
|
||||
// val pathWithLocation = path.plus(locationPath)
|
||||
// val feature = route.application.feature(Kompendium)
|
||||
// feature.config.spec.paths.getOrPut(pathWithLocation) { Path() }
|
||||
// val baseInfo = parseMethodInfo(info, paramType, requestType, responseType, feature)
|
||||
// return LocationBaseInfo(baseInfo, feature, pathWithLocation)
|
||||
// }
|
||||
//
|
||||
// data class LocationBaseInfo(
|
||||
// val op: PathOperation,
|
||||
// val feature: Kompendium,
|
||||
// val path: String
|
||||
// )
|
||||
//}
|
@ -0,0 +1,110 @@
|
||||
package io.bkbn.kompendium.locations
|
||||
|
||||
//import io.bkbn.kompendium.core.KompendiumPreFlight.methodNotarizationPreFlight
|
||||
//import io.bkbn.kompendium.core.metadata.method.DeleteInfo
|
||||
//import io.bkbn.kompendium.core.metadata.method.GetInfo
|
||||
//import io.bkbn.kompendium.core.metadata.method.PostInfo
|
||||
//import io.bkbn.kompendium.core.metadata.method.PutInfo
|
||||
//import io.bkbn.kompendium.oas.path.PathOperation
|
||||
//import io.ktor.application.ApplicationCall
|
||||
//import io.ktor.http.HttpMethod
|
||||
//import io.ktor.locations.KtorExperimentalLocationsAPI
|
||||
//import io.ktor.locations.handle
|
||||
//import io.ktor.locations.location
|
||||
//import io.ktor.routing.Route
|
||||
//import io.ktor.routing.method
|
||||
//import io.ktor.util.pipeline.PipelineContext
|
||||
//
|
||||
///**
|
||||
// * This version of notarized routes leverages the Ktor [io.ktor.locations.Locations] plugin to provide type safe access
|
||||
// * to all path and query parameters.
|
||||
// */
|
||||
//@KtorExperimentalLocationsAPI
|
||||
//object NotarizedLocation {
|
||||
//
|
||||
// /**
|
||||
// * Notarization for an HTTP GET request leveraging the Ktor [io.ktor.locations.Locations] plugin
|
||||
// * @param TParam The class containing all parameter fields.
|
||||
// * Each field must be annotated with @[io.bkbn.kompendium.annotations.Param].
|
||||
// * Additionally, the class must be annotated with @[io.ktor.locations.Location].
|
||||
// * @param TResp Class detailing the expected API response
|
||||
// * @param info Route metadata
|
||||
// * @param postProcess Adds an optional callback hook to perform manual overrides on the generated [PathOperation]
|
||||
// */
|
||||
// inline fun <reified TParam : Any, reified TResp : Any> Route.notarizedGet(
|
||||
// info: GetInfo<TParam, TResp>,
|
||||
// postProcess: (PathOperation) -> PathOperation = { p -> p },
|
||||
// noinline body: suspend PipelineContext<Unit, ApplicationCall>.(TParam) -> Unit
|
||||
// ): Route = methodNotarizationPreFlight<TParam, Unit, TResp>() { paramType, requestType, responseType ->
|
||||
// val lbi = LocationMethodParser.processBaseInfo<TParam>(paramType, requestType, responseType, info, this)
|
||||
// lbi.feature.config.spec.paths[lbi.path]?.get = postProcess(lbi.op)
|
||||
// return location(TParam::class) {
|
||||
// method(HttpMethod.Get) { handle(body) }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Notarization for an HTTP POST request leveraging the Ktor [io.ktor.locations.Locations] plugin
|
||||
// * @param TParam The class containing all parameter fields.
|
||||
// * Each field must be annotated with @[io.bkbn.kompendium.annotations.Param]
|
||||
// * Additionally, the class must be annotated with @[io.ktor.locations.Location].
|
||||
// * @param TReq Class detailing the expected API request body
|
||||
// * @param TResp Class detailing the expected API response
|
||||
// * @param info Route metadata
|
||||
// * @param postProcess Adds an optional callback hook to perform manual overrides on the generated [PathOperation]
|
||||
// */
|
||||
// inline fun <reified TParam : Any, reified TReq : Any, reified TResp : Any> Route.notarizedPost(
|
||||
// info: PostInfo<TParam, TReq, TResp>,
|
||||
// postProcess: (PathOperation) -> PathOperation = { p -> p },
|
||||
// noinline body: suspend PipelineContext<Unit, ApplicationCall>.(TParam) -> Unit
|
||||
// ): Route = methodNotarizationPreFlight<TParam, TReq, TResp>() { paramType, requestType, responseType ->
|
||||
// val lbi = LocationMethodParser.processBaseInfo<TParam>(paramType, requestType, responseType, info, this)
|
||||
// lbi.feature.config.spec.paths[lbi.path]?.post = postProcess(lbi.op)
|
||||
// return location(TParam::class) {
|
||||
// method(HttpMethod.Post) { handle(body) }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Notarization for an HTTP Delete request leveraging the Ktor [io.ktor.locations.Locations] plugin
|
||||
// * @param TParam The class containing all parameter fields.
|
||||
// * Each field must be annotated with @[io.bkbn.kompendium.annotations.Param]
|
||||
// * Additionally, the class must be annotated with @[io.ktor.locations.Location].
|
||||
// * @param TReq Class detailing the expected API request body
|
||||
// * @param TResp Class detailing the expected API response
|
||||
// * @param info Route metadata
|
||||
// * @param postProcess Adds an optional callback hook to perform manual overrides on the generated [PathOperation]
|
||||
// */
|
||||
// inline fun <reified TParam : Any, reified TReq : Any, reified TResp : Any> Route.notarizedPut(
|
||||
// info: PutInfo<TParam, TReq, TResp>,
|
||||
// postProcess: (PathOperation) -> PathOperation = { p -> p },
|
||||
// noinline body: suspend PipelineContext<Unit, ApplicationCall>.(TParam) -> Unit
|
||||
// ): Route = methodNotarizationPreFlight<TParam, TReq, TResp>() { paramType, requestType, responseType ->
|
||||
// val lbi = LocationMethodParser.processBaseInfo<TParam>(paramType, requestType, responseType, info, this)
|
||||
// lbi.feature.config.spec.paths[lbi.path]?.put = postProcess(lbi.op)
|
||||
// return location(TParam::class) {
|
||||
// method(HttpMethod.Put) { handle(body) }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Notarization for an HTTP POST request leveraging the Ktor [io.ktor.locations.Locations] plugin
|
||||
// * @param TParam The class containing all parameter fields.
|
||||
// * Each field must be annotated with @[io.bkbn.kompendium.annotations.Param]
|
||||
// * Additionally, the class must be annotated with @[io.ktor.locations.Location].
|
||||
// * @param TResp Class detailing the expected API response
|
||||
// * @param info Route metadata
|
||||
// * @param postProcess Adds an optional callback hook to perform manual overrides on the generated [PathOperation]
|
||||
// */
|
||||
// inline fun <reified TParam : Any, reified TResp : Any> Route.notarizedDelete(
|
||||
// info: DeleteInfo<TParam, TResp>,
|
||||
// postProcess: (PathOperation) -> PathOperation = { p -> p },
|
||||
// noinline body: suspend PipelineContext<Unit, ApplicationCall>.(TParam) -> Unit
|
||||
// ): Route = methodNotarizationPreFlight<TParam, Unit, TResp> { paramType, requestType, responseType ->
|
||||
// val lbi = LocationMethodParser.processBaseInfo<TParam>(paramType, requestType, responseType, info, this)
|
||||
// lbi.feature.config.spec.paths[lbi.path]?.delete = postProcess(lbi.op)
|
||||
// return location(TParam::class) {
|
||||
// method(HttpMethod.Delete) { handle(body) }
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -0,0 +1,82 @@
|
||||
package io.bkbn.kompendium.locations
|
||||
|
||||
//import io.bkbn.kompendium.core.fixtures.TestHelpers.openApiTestAllSerializers
|
||||
//import io.bkbn.kompendium.locations.util.locationsConfig
|
||||
//import io.bkbn.kompendium.locations.util.notarizedDeleteNestedLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedDeleteSimpleLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedGetNestedLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedGetNestedLocationFromNonLocationClass
|
||||
//import io.bkbn.kompendium.locations.util.notarizedGetSimpleLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedPostNestedLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedPostSimpleLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedPutNestedLocation
|
||||
//import io.bkbn.kompendium.locations.util.notarizedPutSimpleLocation
|
||||
//import io.kotest.core.spec.style.DescribeSpec
|
||||
//
|
||||
//class KompendiumLocationsTest : DescribeSpec({
|
||||
// describe("Locations") {
|
||||
// it("Can notarize a get request with a simple location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_get_simple_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedGetSimpleLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a get request with a nested location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_get_nested_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedGetNestedLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a post with a simple location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_post_simple_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedPostSimpleLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a post with a nested location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_post_nested_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedPostNestedLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a put with a simple location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_put_simple_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedPutSimpleLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a put with a nested location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_put_nested_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedPutNestedLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a delete with a simple location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_delete_simple_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedDeleteSimpleLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a delete with a nested location") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_delete_nested_location.json") {
|
||||
// locationsConfig()
|
||||
// notarizedDeleteNestedLocation()
|
||||
// }
|
||||
// }
|
||||
// it("Can notarize a get with a nested location nested in a non-location class") {
|
||||
// // act
|
||||
// openApiTestAllSerializers("notarized_get_nested_location_from_non_location_class.json") {
|
||||
// locationsConfig()
|
||||
// notarizedGetNestedLocationFromNonLocationClass()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//})
|
@ -0,0 +1,22 @@
|
||||
package io.bkbn.kompendium.locations.util
|
||||
|
||||
//import io.bkbn.kompendium.annotations.Param
|
||||
//import io.bkbn.kompendium.annotations.ParamType
|
||||
//import io.ktor.locations.Location
|
||||
//
|
||||
//@Location("/test/{name}")
|
||||
//data class SimpleLoc(@Param(ParamType.PATH) val name: String) {
|
||||
// @Location("/nesty")
|
||||
// data class NestedLoc(@Param(ParamType.QUERY) val isCool: Boolean, val parent: SimpleLoc)
|
||||
//}
|
||||
//
|
||||
//object NonLocationObject {
|
||||
// @Location("/test/{name}")
|
||||
// data class SimpleLoc(@Param(ParamType.PATH) val name: String) {
|
||||
// @Location("/nesty")
|
||||
// data class NestedLoc(@Param(ParamType.QUERY) val isCool: Boolean, val parent: SimpleLoc)
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//data class SimpleResponse(val result: Boolean)
|
||||
//data class SimpleRequest(val input: String)
|
@ -0,0 +1,107 @@
|
||||
package io.bkbn.kompendium.locations.util
|
||||
|
||||
//import io.bkbn.kompendium.locations.NotarizedLocation.notarizedDelete
|
||||
//import io.bkbn.kompendium.locations.NotarizedLocation.notarizedGet
|
||||
//import io.bkbn.kompendium.locations.NotarizedLocation.notarizedPost
|
||||
//import io.bkbn.kompendium.locations.NotarizedLocation.notarizedPut
|
||||
//import io.ktor.application.Application
|
||||
//import io.ktor.application.call
|
||||
//import io.ktor.application.install
|
||||
//import io.ktor.locations.Locations
|
||||
//import io.ktor.response.respondText
|
||||
//import io.ktor.routing.route
|
||||
//import io.ktor.routing.routing
|
||||
//
|
||||
//fun Application.locationsConfig() {
|
||||
// install(Locations)
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedGetSimpleLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedGet(TestResponseInfo.testGetSimpleLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedGetNestedLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedGet(TestResponseInfo.testGetNestedLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedPostSimpleLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedPost(TestResponseInfo.testPostSimpleLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedPostNestedLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedPost(TestResponseInfo.testPostNestedLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedPutSimpleLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedPut(TestResponseInfo.testPutSimpleLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedPutNestedLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedPut(TestResponseInfo.testPutNestedLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedDeleteSimpleLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedDelete(TestResponseInfo.testDeleteSimpleLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedDeleteNestedLocation() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedDelete(TestResponseInfo.testDeleteNestedLocation) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun Application.notarizedGetNestedLocationFromNonLocationClass() {
|
||||
// routing {
|
||||
// route("/test") {
|
||||
// notarizedGet(TestResponseInfo.testGetNestedLocationFromNonLocationClass) {
|
||||
// call.respondText { "hey dude ‼️ congratz on the get request" }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -0,0 +1,97 @@
|
||||
package io.bkbn.kompendium.locations.util
|
||||
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.RequestInfo
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.ResponseInfo
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.method.DeleteInfo
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.method.GetInfo
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.method.PostInfo
|
||||
//import io.bkbn.kompendium.core.legacy.metadata.method.PutInfo
|
||||
//import io.ktor.http.HttpStatusCode
|
||||
//
|
||||
//object TestResponseInfo {
|
||||
// val testGetSimpleLocation = GetInfo<SimpleLoc, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testPostSimpleLocation = PostInfo<SimpleLoc, SimpleRequest, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// requestInfo = RequestInfo(
|
||||
// description = "Cool stuff"
|
||||
// ),
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testPutSimpleLocation = PutInfo<SimpleLoc, SimpleRequest, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// requestInfo = RequestInfo(
|
||||
// description = "Cool stuff"
|
||||
// ),
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testDeleteSimpleLocation = DeleteInfo<SimpleLoc, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testGetNestedLocation = GetInfo<SimpleLoc.NestedLoc, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testPostNestedLocation = PostInfo<SimpleLoc.NestedLoc, SimpleRequest, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// requestInfo = RequestInfo(
|
||||
// description = "Cool stuff"
|
||||
// ),
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testPutNestedLocation = PutInfo<SimpleLoc.NestedLoc, SimpleRequest, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// requestInfo = RequestInfo(
|
||||
// description = "Cool stuff"
|
||||
// ),
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
// val testDeleteNestedLocation = DeleteInfo<SimpleLoc.NestedLoc, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
//
|
||||
// val testGetNestedLocationFromNonLocationClass = GetInfo<NonLocationObject.SimpleLoc.NestedLoc, SimpleResponse>(
|
||||
// summary = "Location Test",
|
||||
// description = "A cool test",
|
||||
// responseInfo = ResponseInfo(
|
||||
// status = HttpStatusCode.OK,
|
||||
// description = "A successful endeavor"
|
||||
// )
|
||||
// )
|
||||
//}
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}/nesty": {
|
||||
"delete": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isCool",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}": {
|
||||
"delete": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}/nesty": {
|
||||
"get": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isCool",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}/nesty": {
|
||||
"get": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isCool",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}": {
|
||||
"get": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
110
locations/src/test/resources/notarized_post_nested_location.json
Normal file
110
locations/src/test/resources/notarized_post_nested_location.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}/nesty": {
|
||||
"post": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isCool",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Cool stuff",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleRequest": {
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"input"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
101
locations/src/test/resources/notarized_post_simple_location.json
Normal file
101
locations/src/test/resources/notarized_post_simple_location.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}": {
|
||||
"post": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Cool stuff",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleRequest": {
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"input"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
110
locations/src/test/resources/notarized_put_nested_location.json
Normal file
110
locations/src/test/resources/notarized_put_nested_location.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}/nesty": {
|
||||
"put": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isCool",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Cool stuff",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleRequest": {
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"input"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
101
locations/src/test/resources/notarized_put_simple_location.json
Normal file
101
locations/src/test/resources/notarized_put_simple_location.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Test API",
|
||||
"version": "1.33.7",
|
||||
"description": "An amazing, fully-ish 😉 generated API spec",
|
||||
"termsOfService": "https://example.com",
|
||||
"contact": {
|
||||
"name": "Homer Simpson",
|
||||
"url": "https://gph.is/1NPUDiM",
|
||||
"email": "chunkylover53@aol.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://myawesomeapi.com",
|
||||
"description": "Production instance of my API"
|
||||
},
|
||||
{
|
||||
"url": "https://staging.myawesomeapi.com",
|
||||
"description": "Where the fun stuff happens"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test/test/{name}": {
|
||||
"put": {
|
||||
"tags": [],
|
||||
"summary": "Location Test",
|
||||
"description": "A cool test",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": true,
|
||||
"deprecated": false
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Cool stuff",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful endeavor",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SimpleResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SimpleRequest": {
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"input"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SimpleResponse": {
|
||||
"properties": {
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"security": [],
|
||||
"tags": []
|
||||
}
|
Reference in New Issue
Block a user