[markdown] Fix broken links when generating markdown (#5569)

* [markdown] Fix broken links when generating markdown

The `api.mustache` file generates links to the markdown model files.
These links were previously brokeen.

Additionally, the defaultPackage for markdown is "/Models", so this
looked pretty in the heading for model files. So this prefix has been
stripped from the header in `model.mustache`.

* Re-generate Petstore samples for markdown
This commit is contained in:
Samuel Hoffstaetter 2020-03-10 10:30:00 -07:00 committed by GitHub
parent b1aecaded0
commit de2753dfc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 25 additions and 25 deletions

View File

@ -17,7 +17,7 @@ Class | Method | HTTP request | Description
## Documentation for Models ## Documentation for Models
{{#modelPackage}} {{#modelPackage}}
{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}](Models/{{modelDocPath}}{{{classname}}}.md) {{#models}}{{#model}} - [{{{classname}}}](./{{{modelPackage}}}/{{modelDocPath}}{{{classname}}}.md)
{{/model}}{{/models}} {{/model}}{{/models}}
{{/modelPackage}} {{/modelPackage}}
{{^modelPackage}} {{^modelPackage}}

View File

@ -22,12 +22,12 @@ Method | HTTP request | Description
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**](../{{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}
{{/allParams}} {{/allParams}}
### Return type ### Return type
{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{modelPackage}}/{{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} {{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**](../{{modelPackage}}/{{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}
### Authorization ### Authorization

View File

@ -1,6 +1,6 @@
{{#models}} {{#models}}
{{#model}} {{#model}}
# {{{packageName}}}.{{modelPackage}}.{{{classname}}} # {{{classname}}}
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
@ -16,4 +16,4 @@ Name | Type | Description | Notes
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
{{/model}} {{/model}}
{{/models}} {{/models}}

View File

@ -24,7 +24,7 @@ Add a new pet to the store
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](/Models/Pet.md)| Pet object that needs to be added to the store | **body** | [**Pet**](..//Models/Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
@ -77,11 +77,11 @@ Finds Pets by status
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**status** | [**List**](/Models/String.md)| Status values that need to be considered for filter | [default to null] [enum: available, pending, sold] **status** | [**List**](..//Models/String.md)| Status values that need to be considered for filter | [default to null] [enum: available, pending, sold]
### Return type ### Return type
[**List**](/Models/Pet.md) [**List**](..//Models/Pet.md)
### Authorization ### Authorization
@ -104,11 +104,11 @@ Finds Pets by tags
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**tags** | [**List**](/Models/String.md)| Tags to filter by | [default to null] **tags** | [**List**](..//Models/String.md)| Tags to filter by | [default to null]
### Return type ### Return type
[**List**](/Models/Pet.md) [**List**](..//Models/Pet.md)
### Authorization ### Authorization
@ -135,7 +135,7 @@ Name | Type | Description | Notes
### Return type ### Return type
[**Pet**](/Models/Pet.md) [**Pet**](..//Models/Pet.md)
### Authorization ### Authorization
@ -156,7 +156,7 @@ Update an existing pet
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](/Models/Pet.md)| Pet object that needs to be added to the store | **body** | [**Pet**](..//Models/Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
@ -214,7 +214,7 @@ Name | Type | Description | Notes
### Return type ### Return type
[**ApiResponse**](/Models/ApiResponse.md) [**ApiResponse**](..//Models/ApiResponse.md)
### Authorization ### Authorization

View File

@ -1,4 +1,4 @@
# ./Models.ApiResponse # ApiResponse
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -1,4 +1,4 @@
# ./Models.Category # Category
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -1,4 +1,4 @@
# ./Models.Order # Order
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -1,4 +1,4 @@
# ./Models.Pet # Pet
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -1,4 +1,4 @@
# ./Models.Tag # Tag
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -1,4 +1,4 @@
# ./Models.User # User
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes

View File

@ -32,12 +32,12 @@ Class | Method | HTTP request | Description
<a name="documentation-for-models"></a> <a name="documentation-for-models"></a>
## Documentation for Models ## Documentation for Models
- [/Models.ApiResponse](Models/ApiResponse.md) - [ApiResponse](.//Models/ApiResponse.md)
- [/Models.Category](Models/Category.md) - [Category](.//Models/Category.md)
- [/Models.Order](Models/Order.md) - [Order](.//Models/Order.md)
- [/Models.Pet](Models/Pet.md) - [Pet](.//Models/Pet.md)
- [/Models.Tag](Models/Tag.md) - [Tag](.//Models/Tag.md)
- [/Models.User](Models/User.md) - [User](.//Models/User.md)
<a name="documentation-for-authorization"></a> <a name="documentation-for-authorization"></a>