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@268bbbb563dd2811d3dce0d193f2cb9e543bf92eEntrypoint
Return Type
OpenapiChanges !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | Version (image tag) to use from the official image repository as a base container. |
| container | Container | - | Custom container to use as a base container. |
| noStyle | Boolean | - | Disable all color output and all terminal styling (useful for CI/CD). |
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
func (m *MyModule) Example() *dagger.OpenapiChanges {
return dag.
OpenapiChanges()
}@function
def example() -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | The Git repository containing the OpenAPI specs. |
| spec | String ! | - | Path to the OpenAPI spec file. |
| noStyle | Boolean | - | Disable all color output and all terminal styling (useful for CI/CD). |
| top | Boolean | - | Only show the latest changes (the last git revision against HEAD). |
| limit | Integer | - | Limit the number of changes to show when using git. |
| base | String | - | Base URL or Base working directory to use for relative references. |
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
local --source DIR_PATH --spec stringfunc (m *MyModule) Example(source *dagger.Directory, spec string) *dagger.OpenapiChangesRun {
return dag.
OpenapiChanges().
Local(source, spec)
}@function
def example(source: dagger.Directory, spec: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | The URL of the OpenAPI spec file. |
| noStyle | Boolean | - | Disable all color output and all terminal styling (useful for CI/CD). |
| top | Boolean | - | Only show the latest changes (the last git revision against HEAD). |
| limit | Integer | - | Limit the number of changes to show when using git. |
| base | String | - | Base URL or Base working directory to use for relative references. |
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
remote --url stringfunc (m *MyModule) Example(url string) *dagger.OpenapiChangesRun {
return dag.
OpenapiChanges().
Remote(url)
}@function
def example(url: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| old | File ! | - | The old OpenAPI spec file. |
| new | File ! | - | The new OpenAPI spec file. |
| source | Directory | - | Optional source directory to use for relative references. |
| noStyle | Boolean | - | Disable all color output and all terminal styling (useful for CI/CD). |
| base | String | - | Base URL or Base working directory to use for relative references. |
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:pathfunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.OpenapiChangesRun {
return dag.
OpenapiChanges().
Diff(old, new)
}@function
def example(old: dagger.File, new: dagger.File) -> dagger.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@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
summaryfunc (m *MyModule) Example(ctx context.Context, old *dagger.File, new *dagger.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@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
markdownfunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.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@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
jsonfunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.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@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
htmlfunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.OpenapiChangesHtmlReport {
return dag.
OpenapiChanges().
Diff(old, new).
Html()
}@function
def example(old: dagger.File, new: dagger.File) -> dagger.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@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
html \
filefunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| port | Integer | 8080 | The port to serve the HTML report on. |
Example
dagger -m github.com/sagikazarmark/daggerverse/openapi-changes@268bbbb563dd2811d3dce0d193f2cb9e543bf92e call \
diff --old file:path --new file:path \
html \
servefunc (m *MyModule) Example(old *dagger.File, new *dagger.File) *dagger.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()
}