Created
February 25, 2022 10:17
-
-
Save vishwac09/6249608fbc8f860ea4ba8e82df84a7ac to your computer and use it in GitHub Desktop.
VehicleCreateSchema
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
<?php | |
class VehicleCreateSchema { | |
// Schema file to validate POST request. | |
public function getCreateSchema() { | |
return (object) [ | |
"type" => "object", | |
"properties" => (object) [ | |
"name" => (object) [ | |
"type" => "string", | |
], | |
"company" => (object) [ | |
"type" => "string", | |
], | |
"manufacture_year" => (object) [ | |
"type" => "number", | |
], | |
"mileage" => (object) [ | |
"type" => "number", | |
], | |
"transmission_type" => (object) [ | |
"type" => "string", | |
], | |
"owner" => (object) [ | |
"type" => "string", | |
], | |
"registration_number" => (object) [ | |
"type" => "string", | |
], | |
], | |
"required" => ["name", "company", "manufacture_year", "mileage", "transmission_type"], | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment