-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #2
- Loading branch information
Showing
10 changed files
with
789 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": true | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { TFileReader } from './index'; | ||
import * as yaml from 'js-yaml'; | ||
|
||
export type TJSON = { | ||
[key: string]: unknown; | ||
}; | ||
export type TFileReader = (buffer: Buffer) => TJSON; | ||
|
||
export const fromJSON: TFileReader = buffer => JSON.parse(buffer.toString()); | ||
export const fromYaml: TFileReader = buffer => yaml.safeLoad(buffer.toString()); |
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
swagger: '2.0' | ||
info: | ||
version: 1.0.0 | ||
title: Swagger Petstore | ||
paths: [] | ||
|
||
definitions: | ||
Order: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
petId: | ||
type: integer | ||
format: int64 | ||
quantity: | ||
type: integer | ||
format: int32 | ||
shipDate: | ||
type: string | ||
format: date-time | ||
status: | ||
type: string | ||
description: Order Status | ||
enum: | ||
- placed | ||
- approved | ||
- delivered | ||
complete: | ||
type: boolean | ||
default: false | ||
xml: | ||
name: Order | ||
User: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
username: | ||
type: string | ||
firstName: | ||
type: string | ||
lastName: | ||
type: string | ||
email: | ||
type: string | ||
password: | ||
type: string | ||
phone: | ||
type: string | ||
userStatus: | ||
type: integer | ||
format: int32 | ||
description: User Status | ||
xml: | ||
name: User | ||
Category: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
xml: | ||
name: Category | ||
Tag: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
xml: | ||
name: Tag | ||
ApiResponse: | ||
type: object | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
type: | ||
type: string | ||
message: | ||
type: string | ||
Pet: | ||
type: object | ||
required: | ||
- name | ||
- photoUrls | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
category: | ||
"$ref": "#/definitions/Category" | ||
name: | ||
type: string | ||
example: doggie | ||
photoUrls: | ||
type: array | ||
xml: | ||
name: photoUrl | ||
wrapped: true | ||
items: | ||
type: string | ||
tags: | ||
type: array | ||
xml: | ||
name: tag | ||
wrapped: true | ||
items: | ||
"$ref": "#/definitions/Tag" | ||
status: | ||
type: string | ||
description: pet status in the store | ||
enum: | ||
- available | ||
- pending | ||
- sold | ||
xml: | ||
name: Pet | ||
EmptyObject: | ||
type: object |
Oops, something went wrong.