[kotlin] api/model docs#5731
Merged
wing328 merged 1 commit intoswagger-api:masterfrom May 30, 2017
Merged
Conversation
This commit adds Api/Model/Auth documentation to the generated README.md. Because auth support is not yet fully implemented (users can manually set default headers globally), there aren't examples for helper auth methods. Models with inline enums document allowed values rather than pointing to a generated enum class. Two global additionalProperties were added (generateApiDocs, generateModelDocs) to allow templates to conditionally display documentatoin depending on these mutually exclusive settings. All current generators supporting docs will attempt to link to generated models when only api docs are specified. This also moves the $@ bash parameter in bin/kotlin-client-petstore.sh to the end of the args variable. This is because $@ can only be used to pass System properties like -DdebugModels, can can already be passed as: JAVA_OPTS="$JAVA_OPTS -DdebugModels" ./bin/kotlin-client-petstore.sh By moving the $@ to the end of the args, it allows us to pass additional properties and other switches directly to the script.
21 tasks
Contributor
Author
|
This PR addresses a few todos from #5730 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
This commit adds Api/Model/Auth documentation to the generated
README.md. Because auth support is not yet fully implemented (users can
manually set default headers globally), there aren't examples for helper
auth methods.
Models with inline enums document allowed values rather than pointing to
a generated enum class.
Two global additionalProperties were added (
generateApiDocs,generateModelDocs) to allow templates to conditionally displaydocumentation depending on these mutually exclusive settings. All
current generators supporting docs will attempt to link to generated
models when only api docs are specified.
This also moves the
$@bash parameter inbin/kotlin-client-petstore.shto the end of the args variable. This is because
$@can only be used topass System properties like
-DdebugModels, can can already be passed as:JAVA_OPTS="$JAVA_OPTS -DdebugModels" ./bin/kotlin-client-petstore.shBy moving the
$@to the end of the args, it allows us to pass additionalproperties and other switches directly to the script.
NOTE I didn't regenerate samples because I've moved the kotlin output from
samples/client/kotlintosamples/client/petstore/kotlinas part of PR #5729. I wanted to avoid too many merge conflicts and figured docs would get generated eventually anyway. Here are some samples:Pet
Properties
Enum: status
StoreApi
All URIs are relative to http://petstore.swagger.io/v2
getInventory
Returns pet inventories by status
Returns a map of status codes to quantities
Example
Parameters
This endpoint does not need any parameter.
Return type
kotlin.collections.Map<kotlin.String, kotlin.Int>
Authorization
api_key
HTTP request headers