Skip to content

Commit

Permalink
change readme
Browse files Browse the repository at this point in the history
  • Loading branch information
helloyou2012 committed Mar 18, 2019
1 parent 615c421 commit 8f6f3f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type options = {

> More fields of [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operation-object)

```
```js
type Params = {
in: string, // parameter in: `path`, `query`, `header`, `cookie`
type: string, // parameter type
Expand All @@ -116,7 +116,7 @@ type Params = {
* Array type: `array<string>`, `array<number|string>`
* Custom type: `Pet`, `array<Pet>`

```
```js
type Body = string | {
[property]: Schema
}
Expand All @@ -130,7 +130,7 @@ body examples:

### `mapper.schema(name, properties, options) => Mapper` alias `mapper.define()`

```
```js
mapper.schema('Tag', {
id: { type: 'integer', format: 'int64' },
name: { type: 'string' }
Expand All @@ -153,7 +153,7 @@ mapper.schema('Pet', {

Support type extends:

```
```js
mapper.schema('Model', {
id: { type: 'number' },
createdAt: { type: 'datetime' },
Expand All @@ -166,7 +166,7 @@ mapper.schema('User: Model', {

### BodyParser

```
```js
mapper.post('/users', {
body: 'User'
}, (ctx) => {
Expand All @@ -176,7 +176,7 @@ mapper.post('/users', {

Multipart and file upload:

```
```js
mapper.post('/uploadImage', {
bodyparser: { multipart: true },
body: {
Expand Down

0 comments on commit 8f6f3f4

Please sign in to comment.