[BUG][JAVA] Description
Created by: Ankhell
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
If path to OpenAPI 3 specification file contains spaces you get an error
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'openapi': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
Everything generates just fine if there is no spaces and backslashes in path
openapi-generator version
5.0.0
OpenAPI declaration file content or url
openapi: 3.0.1
info:
title: SOME REST API
description: SOME REST API
version: 1.0.3
servers:
- url: /api
description: current environment
- url: http://localhost:8080/api
paths:
/somePath:
get:
responses:
200:
description: Request OK.
content:
'text/plain':
schema:
type: string
Generation Details
java -jar openapi-generator-cli-5.jar generate -i "C:\Idea Projects\dummy\dummy.yml" -g java -o "C:\Idea Projects\dummy\results" --library rest-assured --api-package "com.example.dummy.api" --model-package "com.example.dummy.model" --invoker-package "com.example.dummy.invoker"
everything works fine with
java -jar openapi-generator-cli-5.jar generate -i "C:/IdeaProjects/dummy/dummy.yml" -g java -o "C:/IdeaProjects/dummy/results" --library rest-assured --api-package "com.example.dummy.api" --model-package "com.example.dummy.model" --invoker-package "com.example.dummy.invoker"
Steps to reproduce
- Try to generate sources from openAPI 3 spec file which path contains spaces or backslashes