{"action":"created","issue":{"url":"https://api.github.com/repos/networknt/light-codegen/issues/163","repository_url":"https://api.github.com/repos/networknt/light-codegen","labels_url":"https://api.github.com/repos/networknt/light-codegen/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/networknt/light-codegen/issues/163/comments","events_url":"https://api.github.com/repos/networknt/light-codegen/issues/163/events","html_url":"https://github.com/networknt/light-codegen/issues/163","id":347957829,"node_id":"MDU6SXNzdWUzNDc5NTc4Mjk=","number":163,"title":"java.lang.ClassCastException: java.lang.String cannot be cast to com.jsoniter.any.Any","user":{"login":"siom79","id":3755956,"node_id":"MDQ6VXNlcjM3NTU5NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/3755956?v=4","gravatar_id":"","url":"https://api.github.com/users/siom79","html_url":"https://github.com/siom79","followers_url":"https://api.github.com/users/siom79/followers","following_url":"https://api.github.com/users/siom79/following{/other_user}","gists_url":"https://api.github.com/users/siom79/gists{/gist_id}","starred_url":"https://api.github.com/users/siom79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siom79/subscriptions","organizations_url":"https://api.github.com/users/siom79/orgs","repos_url":"https://api.github.com/users/siom79/repos","events_url":"https://api.github.com/users/siom79/events{/privacy}","received_events_url":"https://api.github.com/users/siom79/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-06T14:53:38Z","updated_at":"2018-08-07T10:02:46Z","closed_at":null,"author_association":"NONE","body":"I have the following OpenAPI definition:\r\n```\r\nopenapi: 3.0.0\r\n\r\ninfo:\r\n  title: Example API\r\n  description: The API of the Example service.\r\n  version: 0.0.1\r\n  \r\nservers:\r\n  - url: /example/v1\r\n    \r\ncomponents:\r\n  schemas:\r\n    Person:\r\n      properties:\r\n        personId:\r\n          type: string\r\n      required:  \r\n        - personId\r\n        \r\npaths:\r\n  /persons/{personId}:\r\n    get:\r\n      summary: Returns the requested person.\r\n      description: Returns the person given by the parameter personId.\r\n      parameters:\r\n        - name: personId\r\n          in: path\r\n          required: true\r\n          description: ID of the person\r\n          schema:\r\n            type: string\r\n      responses:\r\n        '200':\r\n          description: Returns the requested person.\r\n          content:\r\n            application/json:\r\n              schema: \r\n                $ref: '#/components/schemas/Person'\r\n        '400':\r\n          description: The specified ID is invalid.\r\n        '404':\r\n          description: A person with the specified ID was not found.\r\n        default:\r\n          description: Unexpected error\r\n```\r\nI run the following command:\r\n```\r\njava -jar codegen-cli.jar -f openapi -o output  -c config.json -m example-openapi-v1.yml\r\n```\r\nThis produces the following error:\r\n```\r\n16:51:11.413 [main] INFO com.fizzed.rocker.runtime.RockerRuntime - Rocker template reloading not activated\r\njava.lang.ClassCastException: java.lang.String cannot be cast to com.jsoniter.any.Any\r\n        at com.networknt.codegen.rest.OpenApiGenerator.injectEndpoints(OpenApiGenerator.java:348)\r\n        at com.networknt.codegen.rest.OpenApiGenerator.generate(OpenApiGenerator.java:134)\r\n        at com.networknt.codegen.Cli.run(Cli.java:98)\r\n        at com.networknt.codegen.Cli.main(Cli.java:50)\r\n```\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/networknt/light-codegen/issues/comments/411004273","html_url":"https://github.com/networknt/light-codegen/issues/163#issuecomment-411004273","issue_url":"https://api.github.com/repos/networknt/light-codegen/issues/163","id":411004273,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTAwNDI3Mw==","user":{"login":"stevehu","id":2042337,"node_id":"MDQ6VXNlcjIwNDIzMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2042337?v=4","gravatar_id":"","url":"https://api.github.com/users/stevehu","html_url":"https://github.com/stevehu","followers_url":"https://api.github.com/users/stevehu/followers","following_url":"https://api.github.com/users/stevehu/following{/other_user}","gists_url":"https://api.github.com/users/stevehu/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehu/subscriptions","organizations_url":"https://api.github.com/users/stevehu/orgs","repos_url":"https://api.github.com/users/stevehu/repos","events_url":"https://api.github.com/users/stevehu/events{/privacy}","received_events_url":"https://api.github.com/users/stevehu/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T10:02:46Z","updated_at":"2018-08-07T10:02:46Z","author_association":"CONTRIBUTOR","body":"I am sorry that I didn't make it clear. The current version only supports OAuth 2.0 security. I will update the generator to support basic authentication. Let's keep this issue open until basic auth is resolved. Thanks."}}
{"actor":{"display_login":"stevehu"}}