Ricardo
08/28/2019, 1:14 PMx-google-endpoints
extension for OpenAPI: https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-endpointsdave
08/29/2019, 7:48 AMpackage org.http4k.contract.openapi
interface OpenApiExtension {
val extensionId: String
fun <NODE> render(): Render<NODE>
}
, which will be used to produce a key/node pair that can be merged into the API JSON docs at the top level - it will also allow people to define their own extensions without importing them into http4k. The OpenAPI2 and 3 objects would need to take a list of these extensions (defaulted to an emptyList to ensure non-breaking API compatability`Ricardo
08/29/2019, 4:09 PMinfo
OpenAPI object: https://docs.apimatic.io/advanced/swagger-codegen-extensions/OpenApiExtension
also merge with non-root objects? This would allow downstream users to modify everything in the Swagger,dave
08/29/2019, 4:28 PMRicardo
08/29/2019, 4:29 PMdave
08/30/2019, 7:36 AMinterface OpenApiExtension {
operator fun <NODE> invoke(node: NODE): Render<NODE>
}
. It's currently in master - take a look and let me know if that works for your purposes.and()
and or()
Ricardo
08/30/2019, 9:22 AM