I have written an API definition in the OpenAPI 3.0 format (https://swagger.io/docs/specification/basic-structure/). Now I'm trying to generate Java Spring objects as I was previously doing with a Swagger 2.0 definition and its associated Maven plugin.
So far, I have a basic API definition that begins with:
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
In my pom.xml
file I have added:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-cli</artifactId>
<version>3.3.3</version>
</dependency>
But when executing mvn install
, I get this error:
com.fasterxml.jackson.core.JsonParseException: Unrecognized
token 'openapi': was expecting ('true', 'false' or 'null')
at [Source: definition\DEFINITION.yml; line: 1, column: 9]
Does anyone know where the problem is?