Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor error message on incorrectly written inheritance: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') #424

Open
jan-matejka opened this issue Mar 15, 2017 · 1 comment

Comments

@jan-matejka
Copy link

Redirected here from swagger-api/swagger-codegen#5080

Description

Poor error message on incorrectly written inheritance: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'swagger': was expecting ('true', 'false' or 'null')

Swagger-codegen version

current master; HEAD = 878b390

Swagger declaration file content or url
swagger: "2.0"

info:
  title: swagger-codegen broken error messages
  version: '1.0'

definitions:
  foo:
    type: object
    properties:
      x:
        type: string

  bar:
    allOf:
      $ref: "#/definitions/foo"
      type: object
      properties:
        y:
          type: string

paths: {}

Note the missing hyphens in front of $ref and type in the single occurence of allOf

Command line used for generation

JAR=".../swagger-codegen.git/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
java -jar "${JAR}" generate -i ~/sscce.yaml -l swagger

Related issues

Plenty, google Unrecognized token 'swagger': was expecting ('true', 'false' or 'null')

Suggest a Fix

invalid contents of allOf: on line {line} expected {expected} got {got} on line {line_no}

@hellojukay
Copy link

same question, anyone can help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants