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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa
Entrypoint
Return Type
OpenapiChanges !
Arguments
Name | Type | 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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
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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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
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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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
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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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
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@b3c06e7e75b592cce5de7eb6ea54565a7ffbf8aa 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()
}