{"action":"closed","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/35","labels_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/35/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/35/events","html_url":"https://github.com/swagger-api/swagger-parser/issues/35","id":66165682,"number":35,"title":"Swagger parser fail to parse the v2.0 example specification","user":{"login":"bertrand-quenin","id":11057786,"avatar_url":"https://avatars.githubusercontent.com/u/11057786?v=3","gravatar_id":"","url":"https://api.github.com/users/bertrand-quenin","html_url":"https://github.com/bertrand-quenin","followers_url":"https://api.github.com/users/bertrand-quenin/followers","following_url":"https://api.github.com/users/bertrand-quenin/following{/other_user}","gists_url":"https://api.github.com/users/bertrand-quenin/gists{/gist_id}","starred_url":"https://api.github.com/users/bertrand-quenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bertrand-quenin/subscriptions","organizations_url":"https://api.github.com/users/bertrand-quenin/orgs","repos_url":"https://api.github.com/users/bertrand-quenin/repos","events_url":"https://api.github.com/users/bertrand-quenin/events{/privacy}","received_events_url":"https://api.github.com/users/bertrand-quenin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-03T15:22:14Z","updated_at":"2015-05-21T04:32:15Z","closed_at":"2015-05-21T04:32:15Z","body":"Hi,\r\n\r\nI'm testing swagger-codegen with the reference specification example (`https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore.yaml`) and it seems it's not working:\r\n\r\n```\r\n~/w/swagger-codegen ❯❯❯ java -jar modules/swagger-codegen-distribution/target/swagger-codegen-distribution-2.1.2-M1.jar -l java -i https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore.yaml\r\nSLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\r\nSLF4J: Defaulting to no-operation (NOP) logger implementation\r\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\r\nreading from https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore.yaml\r\nwhile parsing a block mapping; expected <block end>, but found Scalar;  in 'reader', line 1, column 15:\r\n    swagger: \"2.0\"info:  version: 1.0.0  title: Sw ... \r\n                  ^\r\nreading from https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/yaml/petstore.yaml\r\nwhile parsing a block mapping; expected <block end>, but found Scalar;  in 'reader', line 1, column 15:\r\n    swagger: \"2.0\"info:  version: 1.0.0  title: Sw ... \r\n                  ^\r\ncom.fasterxml.jackson.core.JsonParseException: Unrecognized token 'swagger': was expecting ('true', 'false' or 'null')\r\n at [Source: swagger: \"2.0\"info:  version: 1.0.0  title: Swagger Petstore  license:    name: MIThost: petstore.swagger.wordnik.combasePath: /v1schemes:  - httpconsumes:  - application/jsonproduces:  - application/jsonpaths:  /pets:    get:      summary: List all pets      operationId: listPets      tags:        - pets      parameters:        - name: limit          in: query          description: How many items to return at one time (max 100)          required: false          type: integer          format: int32      responses:        200:          description: An paged array of pets          headers:            x-next:              type: string              description: A link to the next page of responses          schema:            $ref: Pets        default:          description: unexpected error          schema:            $ref: Error    post:      summary: Create a pet      operationId: createPets      tags:        - pets      responses:        201:          description: Null response        default:          description: unexpected error          schema:            $ref: Error  /pets/{petId}:    get:      summary: Info for a specific pet      operationId: showPetById      tags:        - pets      parameters:        - name: petId          in: path          description: The id of the pet to retrieve          type: string      responses:        200:          description: Expected response to a valid request          schema:            $ref: Pets        default:          description: unexpected error          schema:            $ref: Errordefinitions:  Pet:    required:      - id      - name    properties:      id:        type: integer        format: int64      name:        type: string      tag:        type: string  Pets:    type: array    items:      $ref: Pet  Error:    required:      - code      - message    properties:      code:        type: integer        format: int32      message:        type: string; line: 1, column: 8]\r\n\tat com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)\r\n\tat com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)\r\n\tat com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2300)\r\n\tat com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1459)\r\n\tat com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:683)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3090)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3036)\r\n\tat com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:1818)\r\n\tat io.swagger.parser.SwaggerCompatConverter.readResourceListing(SwaggerCompatConverter.java:122)\r\n\tat io.swagger.parser.SwaggerCompatConverter.read(SwaggerCompatConverter.java:58)\r\n\tat io.swagger.parser.SwaggerParser.read(SwaggerParser.java:34)\r\n\tat com.wordnik.swagger.codegen.Codegen.main(Codegen.java:87)\r\njava.lang.RuntimeException: missing swagger input or config!\r\n\tat com.wordnik.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:31)\r\n\tat com.wordnik.swagger.codegen.Codegen.main(Codegen.java:99)\r\n```\r\n\r\nDid I miss something ?\r\n\r\nRegards,\r\nBQ."}}