Not generating anything but output success

未关闭
#31 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
openapi, scala

调研方向

先从 build.sbt 和 config.yml 开始,然后在项目根目录运行 sbt openApiGenerate,并检查生成的子项目配置。确认该命令是否使用 swagger.yaml,以及输出是否应位于 generated 下;当配置的 OpenAPI generator 在那里生成文件且没有报告虚假成功时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Hi,

I'm trying to use sbt-openapi-generator but unfortunately, it doesn't seems to work.

Here is the output in the command line. I receive a "success" but I can't find generated code anywhere. There is no error.

C:\dev\CS\CSBackEnd>sbt openApiGenerate
[info] welcome to sbt 1.3.13 (Oracle Corporation Java 1.8.0_201)
[info] loading global plugins from C:\Users\jcote\.sbt\1.0\plugins
[info] loading settings for project csbackend-build from plugins.sbt ...
[info] loading project definition from C:\dev\CS\CSBackEnd\project
[info] loading settings for project root from build.sbt ...
[info] set current project to S360ControlSite (in build file:/C:/dev/CS/CSBackEnd/)
[success] Total time: 0 s, completed Feb 9, 2021 9:05:55 AM

I followed the example pretty closely.

Here is my config.yml

generatorName: "java-play-framework"
outputDir : "generated"
additionalProperties:
  hideGenerationTimestamp: "true"
  booleanGetterPrefix: "is"

Here is the new part of the build.sbt

lazy val generated = project.in(file("generated"))
  .settings(
    openApiInputSpec := "swagger.yaml",
    openApiConfigFile := "config.yml",
    openApiValidateSpec := SettingEnabled,
    openApiGenerateModelTests := SettingDisabled
  )

All the files are at the root, there is only one module in my project... Am I missing something important?
Thanks

主要语言
Scala
星标
43
派生
44
平均合并
2 天 1 小时
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenAPITools/sbt-openapi-generator 的其他 Issue

查看 OpenAPITools/sbt-openapi-generator 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。