phronesis

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

phronesis

Phronesis is a Greek word that is translated as “practical wisdom.” As the namesake suggests, the intent of phronesis is to possess the capability to listen, reflect, and analyze. This project is a work in progress and is not yet functional!

Wrappers and helpers to compose and manage OpenAPI specifications.

Why did you make this?

Manual management of OpenAPI specifications is cumbersome and error-prone, leading to inconsistencies between the actual implementation and the documentation. Currently (as of my knowledge) there is no out of the box solution for generating OpenAPI specifications in Go based on code. This package is intended to remedy this, by providing the possibility to generate json & yaml based OpenAPI specifications using code, or being derived from existing code via http helpers / middleware / go-server support (e.g. echo, gorilla, gin, etc.). In order to generate OpenAPI specifications, this package uses the kin-openapi project and custom type definitions.

go-openapi does not suuport 3.x https://github.com/go-openapi/spec?tab=readme-ov-file#faq

go-swagger uses go-openapi and also thus, does not support current specifications https://github.com/go-swagger/go-swagger

https://github.com/go-openapi/swag also unusable due to the above ^

https://github.com/ogen-go/ogen is closer to what we want, but has limited support for certain operations

Documentation

Overview

Package main provides helper functions for working with openapi spec generation

Directories

Path Synopsis
Package entopenapi contains interfaces for providing phronesis as an ent extension to be used for generating openapi specs with ent
Package entopenapi contains interfaces for providing phronesis as an ent extension to be used for generating openapi specs with ent
Package middleware includes phronesis middleware for HTTP requests
Package middleware includes phronesis middleware for HTTP requests
payloads
Package payloads contains openapi spec payloads
Package payloads contains openapi spec payloads

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL