-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[Core, HTML2] Rendered docs are incomplete #3496
Conversation
- Simple aliased types are now passed to the generator - Body parameters are now provided with their schemas - Schema block is now visibile in the generated documentation
@@ -4,7 +4,11 @@ | |||
<script> | |||
$(document).ready(function() { | |||
var schemaWrapper = {{{jsonSchema}}}; | |||
var schema = schemaWrapper.schema; | |||
|
|||
var schema = findNode('schema',schemaWrapper).schema; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will find node alway return a result here?
continue; // Don't create user-defined classes for aliases | ||
} | ||
} | ||
// if (modelTemplate != null && modelTemplate.containsKey("model")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain what is the impact of this change?
@richardwhiuk thanks for your PR! |
Is this related to #2427 ? |
anybody here who can bring this forward? Recently migrated to openapi-generator from swagger-generator, and using the html generator as an opportunity to publish a "have a quick look" version of the API documentation during a Jenkins build. The bug here breaks this approach :-( |
@richardwhiuk can you resolve the conflicts? |
@macjohnny Yeah, I'll resolve the conflicts. We've spotted some bugs that occur with this fix that I think should be covered along with this fix - I'll try and get those resolved this week. |
thanks for your efforts, guys! |
@richardwhiuk any update :)? |
Thank you for the merge request. I tried it a few minutes ago and merged it with the latest master. Simple objects are working but if objects are nested it still does not work. Concerning the merge conflict I accepted the master and tried also to comment the defaultGenerator passage out as the pull request did. The problem I found so far occurs if the response is a list of objects.
|
Hi, are there any updates on the status of merging this fix? My team is currently dependent on this in order to generate static html2 documentation based on openapi specs that contain all the required annotated documentation (including request schemas). We are using the gradle plugin for this. |
any updates for this fix? |
Patch in #5643 works for me |
I've merged master into this code and opened/merged #7510 As mentioned earlier, #5643 was opened with a similar fix, but after checking the code between the two branches it looks like that PR just copied this code and refactored. I'm pretty big on attribution of contributions, so I've replaced the |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
Simple aliased types are now passed to the generator
Body parameters are now provided with their schemas
Schema block is now visible in the generated documentation
Note, this changes some of the core behaviour, which doesn't pass aliased models to the generator, so may have large scale impacts.
Changes are by @MalachiJones, @mthebridge, @richardwhiuk and others at @Metaswitch
This fixes #1441