swagger-api / swagger-api/swagger-codegen
Can't generate server/client : TypeError: Cannot read property 'generate1' of undefined
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Q&A (please complete the following information)
OS: macOS
Browser: chrome
Version: last, through http://editor.swagger.io/
Method of installation: n/a ,directly through http://editor.swagger.io/
Swagger-Editor version:latest
Swagger/OpenAPI version: OpenAPI 3.0.0
Content & configuration
A very simple swagger yml:
openapi: 3.0.0
info:
title: TEST
description: API endpoints for Phase I integration.
version: '0.1'
paths:
/test:
post:
summary: test
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: string
name:
type: string
responses:
'201':
description: success
Describe the bug you're encountering
I can't generate server or generate client.
It will report:
TypeError: Cannot read property 'generate1' of undefined
at r.downloadGeneratedFile (topbar.jsx:198)
at Object.i (ReactErrorUtils.js:24)
at s (EventPluginUtils.js:83)
at Object.executeDispatchesInOrder (EventPluginUtils.js:106)
at f (EventPluginHub.js:41)
at p (EventPluginHub.js:52)
at Array.forEach ()
at e.exports (forEachAccumulated.js:22)
at Object.processEventQueue (EventPluginHub.js:250)
at ReactEventEmitterMixin.js:15
To reproduce...
Steps to reproduce the behavior:
Go to 'http://editor.swagger.io/
Use the yml content I provided
Click on generate server->python flask
See error
Expected behavior
Could successfully generate server and client
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generate action in topbar.jsx, especially downloadGeneratedFile, and reproduce the failure using the supplied OpenAPI 3.0 YAML in Swagger Editor. Check the Python Flask server-generation path and a client-generation path; done means both generation actions complete without the generate1 TypeError for this definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, openapi, python
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100