Skip to content

v0.22.0

Compare
Choose a tag to compare
@daveshanley daveshanley released this 26 May 22:21
· 104 commits to main since this release

Adds a new 'composed' bundling mode.

// BundleBytesComposed will take a byte slice of an OpenAPI specification and return a composed bundled version of it.
// this is the same as BundleBytes, but it will compose the bundling instead of inline it.
func BundleBytesComposed(bytes []byte, configuration *datamodel.DocumentConfiguration,
 compositionConfig *BundleCompositionConfig) ([]byte, error)

// BundleDocumentComposed will take a v3.Document and return a composed bundled version of it. Composed means
// that every external file will have references lifted out and added to the `components` section of the document.
// Names will be preserved where possible, conflicts will be appended with a number. If the type of the reference cannot
// be determined, it will be added to the `components` section as a `Schema` type, a warning will be logged.
// The document model will be mutated permanently.
//
// Circular references will not be resolved and will be skipped.
func BundleDocumentComposed(model *v3.Document, compositionConfig *BundleCompositionConfig) ([]byte, error)

Docs updates at https://pb33f.io/libopenapi/bundling/

Adds fixes for: