Dagger
Search

openapi-changes

Discover what changed between two OpenAPI specs, or a single spec over time.

Supports OpenAPI 3.1, 3.0 and Swagger

Installation

dagger install github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b

Entrypoint

Return Type
OpenapiChanges !
Arguments
NameTypeDefault ValueDescription
versionString -Version (image tag) to use from the official image repository as a base container.
containerContainer -Custom container to use as a base container.
noStyleBoolean -Disable all color output and all terminal styling (useful for CI/CD).
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
func (m *myModule) example() *OpenapiChanges  {
	return dag.
			OpenapiChanges()
}
@function
def example() -> dag.OpenapiChanges:
	return (
		dag.openapi_changes()
	)
@func()
example(): OpenapiChanges {
	return dag
		.openapiChanges()
}

Types

OpenapiChanges 🔗

local() 🔗

Check for changes in a local Git repository.

Return Type
OpenapiChangesRun !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-The Git repository containing the OpenAPI specs.
specString !-Path to the OpenAPI spec file.
noStyleBoolean -Disable all color output and all terminal styling (useful for CI/CD).
topBoolean -Only show the latest changes (the last git revision against HEAD).
limitInteger -Limit the number of changes to show when using git.
baseString -Base URL or Base working directory to use for relative references.
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 local --source DIR_PATH --spec string
func (m *myModule) example(source *Directory, spec string) *OpenapiChangesRun  {
	return dag.
			OpenapiChanges().
			Local(source, spec)
}
@function
def example(source: dagger.Directory, spec: str) -> dag.OpenapiChangesRun:
	return (
		dag.openapi_changes()
		.local(source, spec)
	)
@func()
example(source: Directory, spec: string): OpenapiChangesRun {
	return dag
		.openapiChanges()
		.local(source, spec)
}

remote() 🔗

Check for changes in a remote Git repository. (Currently only supports GitHub)

Return Type
OpenapiChangesRun !
Arguments
NameTypeDefault ValueDescription
urlString !-The URL of the OpenAPI spec file.
noStyleBoolean -Disable all color output and all terminal styling (useful for CI/CD).
topBoolean -Only show the latest changes (the last git revision against HEAD).
limitInteger -Limit the number of changes to show when using git.
baseString -Base URL or Base working directory to use for relative references.
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 remote --url string
func (m *myModule) example(url string) *OpenapiChangesRun  {
	return dag.
			OpenapiChanges().
			Remote(url)
}
@function
def example(url: str) -> dag.OpenapiChangesRun:
	return (
		dag.openapi_changes()
		.remote(url)
	)
@func()
example(url: string): OpenapiChangesRun {
	return dag
		.openapiChanges()
		.remote(url)
}

diff() 🔗

Compare two OpenAPI specs.

Return Type
OpenapiChangesRun !
Arguments
NameTypeDefault ValueDescription
oldFile !-The old OpenAPI spec file.
newFile !-The new OpenAPI spec file.
sourceDirectory -Optional source directory to use for relative references.
noStyleBoolean -Disable all color output and all terminal styling (useful for CI/CD).
baseString -Base URL or Base working directory to use for relative references.
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path
func (m *myModule) example(old *File, new *File) *OpenapiChangesRun  {
	return dag.
			OpenapiChanges().
			Diff(old, new)
}
@function
def example(old: dagger.File, new: dagger.File) -> dag.OpenapiChangesRun:
	return (
		dag.openapi_changes()
		.diff(old, new)
	)
@func()
example(old: File, new: File): OpenapiChangesRun {
	return dag
		.openapiChanges()
		.diff(old, new)
}

OpenapiChangesRun 🔗

summary() 🔗

Return a summary of the changes.

See https://pb33f.io/openapi-changes/summary/ for more information.

Return Type
String !
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 summary
func (m *myModule) example(ctx context.Context, old *File, new *File) string  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Summary(ctx)
}
@function
async def example(old: dagger.File, new: dagger.File) -> str:
	return await (
		dag.openapi_changes()
		.diff(old, new)
		.summary()
	)
@func()
async example(old: File, new: File): Promise<string> {
	return dag
		.openapiChanges()
		.diff(old, new)
		.summary()
}

markdown() 🔗

Return a summary of the changes in Markdown format.

See https://pb33f.io/openapi-changes/summary/ for more information.

Return Type
File !
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 markdown
func (m *myModule) example(old *File, new *File) *File  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Markdown()
}
@function
def example(old: dagger.File, new: dagger.File) -> dagger.File:
	return (
		dag.openapi_changes()
		.diff(old, new)
		.markdown()
	)
@func()
example(old: File, new: File): File {
	return dag
		.openapiChanges()
		.diff(old, new)
		.markdown()
}

json() 🔗

Return a JSON report of the changes.

See https://pb33f.io/openapi-changes/report/ for more information.

Return Type
File !
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 json
func (m *myModule) example(old *File, new *File) *File  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Json()
}
@function
def example(old: dagger.File, new: dagger.File) -> dagger.File:
	return (
		dag.openapi_changes()
		.diff(old, new)
		.json()
	)
@func()
example(old: File, new: File): File {
	return dag
		.openapiChanges()
		.diff(old, new)
		.json()
}

html() 🔗

Return a HTML report of the changes.

See https://pb33f.io/openapi-changes/html-report/ for more information.

Return Type
OpenapiChangesHtmlReport !
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 html
func (m *myModule) example(old *File, new *File) *OpenapiChangesHtmlReport  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Html()
}
@function
def example(old: dagger.File, new: dagger.File) -> dag.OpenapiChangesHtmlReport:
	return (
		dag.openapi_changes()
		.diff(old, new)
		.html()
	)
@func()
example(old: File, new: File): OpenapiChangesHtmlReport {
	return dag
		.openapiChanges()
		.diff(old, new)
		.html()
}

OpenapiChangesHtmlReport 🔗

file() 🔗

Return Type
File !
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 html \
 file
func (m *myModule) example(old *File, new *File) *File  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Html().
			File()
}
@function
def example(old: dagger.File, new: dagger.File) -> dagger.File:
	return (
		dag.openapi_changes()
		.diff(old, new)
		.html()
		.file()
	)
@func()
example(old: File, new: File): File {
	return dag
		.openapiChanges()
		.diff(old, new)
		.html()
		.file()
}

serve() 🔗

Serve the HTML report on a local server.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
portInteger 8080The port to serve the HTML report on.
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@3b6bf301dfae69d4a0f1b9e5278d4efc4753106b call \
 diff --old file:path --new file:path \
 html \
 serve
func (m *myModule) example(old *File, new *File) *Service  {
	return dag.
			OpenapiChanges().
			Diff(old, new).
			Html().
			Serve()
}
@function
def example(old: dagger.File, new: dagger.File) -> dagger.Service:
	return (
		dag.openapi_changes()
		.diff(old, new)
		.html()
		.serve()
	)
@func()
example(old: File, new: File): Service {
	return dag
		.openapiChanges()
		.diff(old, new)
		.html()
		.serve()
}