Dagger
Search

spectral

An open-source API style guide enforcer and linter.

Installation

dagger install github.com/jedevc/daggerverse-sagikazarmark/spectral@a104424df38ca8b0b758f699dcfeeb0c2210cc2e

Entrypoint

Return Type
Spectral !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
imageString Custom image reference in "repository:tag" format to use as a base container.
containerContainer Custom container to use as a base container.
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/spectral@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
func (m *myModule) example() *Spectral  {
	return dag.
			Spectral()
}
@function
def example() -> dag.Spectral:
	return (
		dag.spectral()
	)
@func()
example(): Spectral {
	return dag
		.spectral()
}

Types

Spectral 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/spectral@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Spectral().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.spectral()
		.container()
	)
@func()
example(): Container {
	return dag
		.spectral()
		.container()
}

lint() 🔗

Lint JSON/YAML documents.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
documents[File ! ] !-JSON/YAML OpenAPI documents.
rulesetFile !-Ruleset file.
failSeverityString -Results of this level or above will trigger a failure exit code. (choices: "error", "warn", "info", "hint") (default "error")
displayOnlyFailuresBoolean -Only output results equal to or greater than fail severity.
resolverFile -Custom json-ref-resolver instance.
encodingString -Text encoding to use. (choices: "utf8", "ascii", "utf-8", "utf16le", "ucs2", "ucs-2", "base64", "latin1") (default "utf8")
verboseBoolean -Increase verbosity.
quietBoolean -No logging, output only.
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/spectral@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
 lint --ruleset file:path
func (m *myModule) example(documents []*File, ruleset *File) *Container  {
	return dag.
			Spectral().
			Lint(documents, ruleset)
}
@function
def example(documents: List[dagger.File], ruleset: dagger.File) -> dagger.Container:
	return (
		dag.spectral()
		.lint(documents, ruleset)
	)
@func()
example(documents: File[], ruleset: File): Container {
	return dag
		.spectral()
		.lint(documents, ruleset)
}