Skip to content

Commit

Permalink
Update overwrite markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
qinezh committed May 9, 2018
1 parent 8661036 commit 0c958fc
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 55 deletions.
17 changes: 17 additions & 0 deletions specs/Cat.CalculateFood.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
uid: CatLibrary.Cat`2.CalculateFood(System.DateTime)
name: "Override CalculateFood Name"
summary: "It's an overridden summary in `markdown` format"
syntax:
parameters:
- id: date
description: "This is overridden description for a parameter. `id` must be specified."
return:
type: System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{System.Int32}}
description: "It's overridden description for return. `type` must be specified."
exceptions:
- type: System.ArgumentException
description: "This is an `overridden` argument exception. you can add additional exception by adding different exception `type`."
---

This is overriding methods. You can override parameter descriptions for methods, you can even add exceptions to methods. Check the intermediate `obj` folder to see the data model of the generated method/class. Override Yaml header should follow the data structure.
25 changes: 0 additions & 25 deletions specs/Cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,3 @@ This is a class talking about [CAT](https://en.wikipedia.org/wiki/Cat).
>
Refer to @CatLibrary.IAnimal to see other animals.

---
uid: CatLibrary.IAnimal
remarks: '*THIS* is remarks overridden in *MARKDWON* file'
---

### Welcome to the **Animal** world!

---
uid: CatLibrary.Cat`2.CalculateFood(System.DateTime)
name: "Override CalculateFood Name"
summary: "It's an overridden summary in `markdown` format"
syntax:
parameters:
- id: date
description: "This is overridden description for a parameter. `id` must be specified."
return:
type: System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{System.Int32}}
description: "It's overridden description for return. `type` must be specified."
exceptions:
- type: System.ArgumentException
description: "This is an `overridden` argument exception. you can add additional exception by adding different exception `type`."
---

This is overriding methods. You can override parameter descriptions for methods, you can even add exceptions to methods. Check the intermediate `obj` folder to see the data model of the generated method/class. Override Yaml header should follow the data structure.
6 changes: 6 additions & 0 deletions specs/CatLibrary.IAnimal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
uid: CatLibrary.IAnimal
remarks: '*THIS* is remarks overridden in *MARKDWON* file'
---

### Welcome to the **Animal** world!
5 changes: 5 additions & 0 deletions specs/petstore-operations.addPet.footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/addPet
footer: *content
---
> NOTE: Add pet only when you needs.
11 changes: 11 additions & 0 deletions specs/petstore-operations.footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0
title: Pet Store APIs
footer: *content
---

### See Alsos

See other REST APIs:
* [Contacts API](../restapi/contacts_swagger2.json)

30 changes: 0 additions & 30 deletions specs/petstore-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,3 @@ title: Pet Store APIs
---

Describe APIs in Pet Store

---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0
title: Pet Store APIs
footer: *content
---

### See Alsos

See other REST APIs:
* [Contacts API](../restapi/contacts_swagger2.json)

---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/addPet
footer: *content
---
> NOTE: Add pet only when you needs.
---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/tag/pet
description: *content
---

Description for pet tag

---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/tag/store
---

Additional description for store tag
6 changes: 6 additions & 0 deletions specs/petstore-operations.tag.pet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/tag/pet
description: *content
---

Description for pet tag
5 changes: 5 additions & 0 deletions specs/petstore-operations.tag.store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
uid: petstore.swagger.io/v2/Swagger Petstore/1.0.0/tag/store
---

Additional description for store tag

0 comments on commit 0c958fc

Please sign in to comment.