-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from SOHELAHMED7/master
Resolve: Improve FakerController to work with relations
- Loading branch information
Showing
4 changed files
with
287 additions
and
5 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
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
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,203 @@ | ||
openapi: 3.0.3 | ||
# Edit this schema and start your project | ||
# This is sample schema | ||
# To generate code which is based on this schema | ||
# run commands mentioned Development section in README.md file | ||
info: | ||
title: 'Proxy-Service' | ||
description: "" | ||
version: 1.0.0 | ||
contact: | ||
name: '...' | ||
email: [email protected] | ||
servers: | ||
- url: 'http://localhost:8937' | ||
description: 'Local Dev API' | ||
security: | ||
- BasicAuth: [] | ||
components: | ||
securitySchemes: | ||
BasicAuth: | ||
type: http | ||
scheme: basic | ||
schemas: | ||
Account: | ||
description: user account | ||
type: object | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
description: account name | ||
type: string | ||
maxLength: 40 | ||
x-faker: 'substr($faker->userName(), 0, 40)' | ||
|
||
Domain: | ||
description: domain | ||
type: object | ||
required: | ||
- id | ||
- name | ||
- account | ||
- created_at | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
description: domain or sub-domain name, in DNS syntax, IDN are converted | ||
type: string | ||
maxLength: 128 | ||
x-faker: '$faker->domainName' | ||
account: | ||
$ref: '#/components/schemas/Account' | ||
|
||
routings: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Routing' | ||
|
||
created_at: | ||
readOnly: true | ||
type: string | ||
format: datetime | ||
x-db-type: datetime | ||
nullable: false | ||
|
||
Routing: | ||
description: rounting specification | ||
type: object | ||
required: | ||
- id | ||
- domain | ||
properties: | ||
id: | ||
type: integer | ||
domain: | ||
$ref: '#/components/schemas/Domain' | ||
path: | ||
type: string | ||
maxLength: 255 | ||
x-faker: '$faker->randomElement(["/", "/", "/", "/", "/api", "/tools", "/assets/web"])' | ||
|
||
ssl: | ||
type: boolean | ||
redirect_to_ssl: | ||
type: boolean | ||
|
||
service: | ||
type: string | ||
maxLength: 255 | ||
x-faker: '"http://tador.cebe.net/" . $faker->domainName' | ||
|
||
created_at: | ||
readOnly: true | ||
type: string | ||
format: datetime | ||
x-db-type: datetime | ||
nullable: true | ||
d123: | ||
$ref: '#/components/schemas/D123' | ||
a123: | ||
$ref: '#/components/schemas/A123' | ||
|
||
D123: | ||
description: desc | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
type: string | ||
A123: | ||
description: desc | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
type: string | ||
b123: | ||
$ref: '#/components/schemas/B123' | ||
B123: | ||
description: desc | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
type: string | ||
c123: | ||
$ref: '#/components/schemas/C123' | ||
C123: | ||
description: desc | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
type: string | ||
E123: | ||
description: desc | ||
type: object | ||
required: | ||
- id | ||
properties: | ||
id: | ||
type: integer | ||
name: | ||
type: string | ||
b123: | ||
$ref: '#/components/schemas/B123' | ||
|
||
|
||
paths: | ||
/: | ||
get: | ||
responses: [] | ||
description: none | ||
|
||
|
||
|
||
# Dependencies: | ||
# 'E123' => [ | ||
# 0 => 'B123' | ||
# ] | ||
# 'Account' => null | ||
# 'C123' => null | ||
# 'Domain' => [ | ||
# 0 => 'Account' | ||
# ] | ||
# 'B123' => [ | ||
# 0 => 'C123' | ||
# ] | ||
# 'Routing' => [ | ||
# 0 => 'Domain' | ||
# 1 => 'D123' | ||
# 2 => 'A123' | ||
# ] | ||
# 'D123' => null | ||
# 'A123' => [ | ||
# 0 => 'B123' | ||
# ] | ||
|
||
# Sorted: | ||
# 'Account', | ||
# 'C123', | ||
# 'D123', | ||
# 'B123', | ||
# 'E123', | ||
# 'Domain', | ||
# 'A123', | ||
# 'Routing', |