-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
205 changed files
with
49,149 additions
and
398 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = [ | ||
{ input: 'samples/swagger' }, | ||
{ input: 'samples/simple', openapi: { outputFile: 'samples/simple-openapi.json' } }, | ||
{ input: 'samples/strapi' }, | ||
{ input: 'samples/freee' }, | ||
{ input: 'samples/openapi' }, | ||
{ input: 'samples/externals' }, | ||
{ input: 'samples/nullable-object' }, | ||
{ input: 'samples/array-one-of' }, | ||
{ input: 'samples/request-bodies' }, | ||
{ input: 'samples/responses' }, | ||
{ input: 'samples/path' }, | ||
{ input: 'samples/headers' }, | ||
{ input: 'samples/allOf-required' }, | ||
]; |
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"info": { | ||
"title": "aspida to OpenAPI", | ||
"version": "v0.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/api" | ||
} | ||
], | ||
"paths": { | ||
"samples/allOf-required/path": { | ||
"get": { | ||
"tags": [ | ||
"path" | ||
], | ||
"parameters": [], | ||
"responses": { | ||
"200": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"description": "取得成功", | ||
"type": "object", | ||
"properties": { | ||
"req_property": { | ||
"description": "required property in response", | ||
"type": "string" | ||
}, | ||
"unreq_property": { | ||
"description": "unrequired property in response", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": {} | ||
} |
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,9 @@ | ||
/* eslint-disable */ | ||
export type ResponseSchema = BaseSchema | ||
|
||
export type BaseSchema = { | ||
/** required property in response */ | ||
req_property?: string | undefined; | ||
/** unrequired property in response */ | ||
unreq_property?: string | undefined; | ||
} |
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,11 @@ | ||
/* eslint-disable */ | ||
import type { DefineMethods } from 'aspida'; | ||
import type * as Types from '../@types'; | ||
|
||
export type Methods = DefineMethods<{ | ||
get: { | ||
status: 200; | ||
/** 取得成功 */ | ||
resBody: Types.ResponseSchema; | ||
}; | ||
}>; |
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,78 @@ | ||
{ | ||
"openapi": "3.1.0", | ||
"info": { | ||
"title": "aspida to OpenAPI", | ||
"version": "v0.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/api" | ||
} | ||
], | ||
"paths": { | ||
"samples/array-one-of/user": { | ||
"get": { | ||
"tags": [ | ||
"user" | ||
], | ||
"parameters": [], | ||
"responses": { | ||
"200": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"description": "sample", | ||
"type": "object", | ||
"properties": { | ||
"user": { | ||
"anyOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"roles": { | ||
"type": "array", | ||
"items": { | ||
"anyOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"authority": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": {} | ||
} |
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,14 @@ | ||
/* eslint-disable */ | ||
export type User = { | ||
id?: string | undefined; | ||
roles?: (RoleA | RoleB)[] | undefined; | ||
} | ||
|
||
export type RoleA = { | ||
name?: string | undefined; | ||
} | ||
|
||
export type RoleB = { | ||
name?: string | undefined; | ||
authority?: string | undefined; | ||
} |
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,14 @@ | ||
/* eslint-disable */ | ||
import type { DefineMethods } from 'aspida'; | ||
import type * as Types from '../@types'; | ||
|
||
export type Methods = DefineMethods<{ | ||
get: { | ||
status: 200; | ||
|
||
/** sample */ | ||
resBody: { | ||
user?: Types.User | null | undefined; | ||
}; | ||
}; | ||
}>; |
Oops, something went wrong.