io.vrap.codegen.languages.python.client.RootInitFileProducer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of python Show documentation
Show all versions of python Show documentation
RAML API client code generators based on the REST Modeling Framework. https://github.com/vrapio/rest-modeling-framework
/**
* Copyright 2021 Michael van Tellingen
*/
package io.vrap.codegen.languages.python.client
import io.vrap.codegen.languages.python.pyGeneratedComment
import io.vrap.rmf.codegen.io.TemplateFile
import io.vrap.rmf.codegen.rendering.FileProducer
import io.vrap.rmf.codegen.types.VrapTypeProvider
import io.vrap.rmf.codegen.di.BasePackageName
class RootInitFileProducer constructor(
val vrapTypeProvider: VrapTypeProvider,
@BasePackageName
val basePackageName: String
) : FileProducer {
override fun produceFiles(): List {
return listOf(produceRootInitFile())
}
fun produceRootInitFile(): TemplateFile {
return TemplateFile(
relativePath = "$basePackageName/__init__.py",
content = """|
|$pyGeneratedComment
|from .client import Client
""".trimMargin()
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy