我以 OpenAPI 3.0 格式 ( https://swagger.io/docs/specification/basic-structure/ )编写了一个 API 定义。现在我正在尝试生成 Java Spring 对象,就像我之前使用 Swagger 2.0 定义及其关联的 Maven 插件所做的那样。
到目前为止,我有一个基本的 API 定义,开头是:
openapi: 3.0.0
info:
title: Demo API
description: This is a basic REST API implementing the [Open API Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification).
version: 0.0.1
在我的pom.xml文件中,我添加了:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-cli</artifactId>
<version>3.3.3</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
但是在执行时mvn install,我收到此错误:
com.fasterxml.jackson.core.JsonParseException: Unrecognized
token 'openapi': was expecting ('true', 'false' or 'null')
at [Source: definition\DEFINITION.yml; line: 1, column: 9]
Run Code Online (Sandbox Code Playgroud)
有谁知道问题出在哪里?
通过查看默认会议记录模板,我看到诸如$currentDateLozenge或 之类的变量$documentOwner。它会按预期创建包含当前日期和我的姓名的页面。但是,当我将此模板复制/粘贴到自定义模板中时,这些变量会像任何其他变量一样通过提示输入值来做出反应。
我想念什么?