Dagger
Search

open-api-codegen

A Dagger module to generate code for OpenAPI specifications

Installation

dagger install github.com/FlrnFrmm/dagger-openapi-codegen@v0.1.0

Entrypoint

Return Type
OpenApiCodegen
Example
dagger -m github.com/FlrnFrmm/dagger-openapi-codegen@913e234a2699e8136471eb8a0140561cf373abe0 call \
func (m *myModule) example() *OpenApiCodegen  {
	return dag.
			OpenApiCodegen()
}
@function
def example() -> dag.OpenApiCodegen:
	return (
		dag.open_api_codegen()
	)
@func()
example(): OpenApiCodegen {
	return dag
		.openApiCodegen()
}

Types

OpenApiCodegen 🔗

openApiCodegen() 🔗

Returns a directory with the generated code from the OpenAPI spec

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
specFile !-The OpenAPI spec file to generate the code from
generatorString !-The Generator to use (e.g. "go" | "rust" | ...)
Example
dagger -m github.com/FlrnFrmm/dagger-openapi-codegen@913e234a2699e8136471eb8a0140561cf373abe0 call \
 open-api-codegen --spec file:path --generator string
func (m *myModule) example(spec *File, generator string) *Directory  {
	return dag.
			OpenApiCodegen().
			OpenApiCodegen(spec, generator)
}
@function
def example(spec: dagger.File, generator: str) -> dagger.Directory:
	return (
		dag.open_api_codegen()
		.open_api_codegen(spec, generator)
	)
@func()
example(spec: File, generator: string): Directory {
	return dag
		.openApiCodegen()
		.openApiCodegen(spec, generator)
}