Skip to content

Commit

Permalink
Min
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Jan 6, 2024
1 parent 6abe84f commit f9e6e3e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 50 deletions.
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "byjg/rest-reference-architecture",
"description": "ByJG's Reference Architecture project for RESTFul services in PHP{ with docker and database integrated",
"description": "ByJG's Reference Architecture project for RESTFul services in PHP with docker and database integrated",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
Expand All @@ -9,18 +9,18 @@
"ext-json": "*",
"ext-openssl": "*",
"ext-curl": "*",
"byjg/config": "4.9.x-dev",
"byjg/anydataset-db": "4.9.x-dev",
"byjg/micro-orm": "4.9.x-dev",
"byjg/authuser": "4.9.x-dev",
"byjg/mailwrapper": "4.9.*",
"byjg/restserver": "4.9.x-dev",
"byjg/config": "^4.9",
"byjg/anydataset-db": "^4.9",
"byjg/micro-orm": "^4.9",
"byjg/authuser": "^4.9",
"byjg/mailwrapper": "^4.9",
"byjg/restserver": "^4.9",
"zircote/swagger-php": "^4.6.1",
"byjg/swagger-test": "4.9.*",
"byjg/migration": "4.9.x-dev",
"byjg/php-daemonize": "4.9.*",
"byjg/shortid": "4.9.*",
"byjg/jinja-php": "4.9.*"
"byjg/swagger-test": "^4.9",
"byjg/migration": "^4.9",
"byjg/php-daemonize": "^4.9",
"byjg/shortid": "^4.9",
"byjg/jinja-php": "^4.9"
},
"require-dev": {
"phpunit/phpunit": "5.7.*|7.4.*|^9.5"
Expand Down
9 changes: 1 addition & 8 deletions public/docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
},
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Local Development server"
}
],
"paths": {
"/dummyhex/{id}": {
"get": {
Expand Down Expand Up @@ -960,8 +954,7 @@
"admin": {
"type": "string",
"format": "string"
},
"uuid": {}
}
},
"type": "object",
"xml": {
Expand Down
52 changes: 22 additions & 30 deletions src/OpenApiSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,40 @@
use OpenApi\Attributes as OA;

#[OA\Info(
version: "1.0.0",
description: "Information about the API",
title: "API Title",
termsOfService: "http://localhost:8080/terms/",
contact: new OA\Contact(
email: "[email protected]"
),
license: new OA\License(
name: "Proprietary"
)
)]
#[OA\Server(
url: "http://localhost:8080",
description: "Local Development server"
version: '1.0.0',
description: 'Information about the API',
title: 'API Title',
termsOfService: 'http://localhost:8080/terms/',
)]
#[OA\Contact(email: '[email protected]')]
#[OA\License(name: 'Proprietary')]
#[OA\ExternalDocumentation(
description: "Find out more about Swagger",
url: "http://localhost:8080/docs"
description: 'Find out more about Swagger',
url: 'http://localhost:8080/docs'
)]
#[OA\SecurityScheme(
securityScheme: "jwt-token",
type: "apiKey",
name: "Authorization",
in: "header"
securityScheme: 'jwt-token',
type: 'apiKey',
name: 'Authorization',
in: 'header'
)]
#[OA\Schema(
schema: "error",
required: ["error"],
schema: 'error',
required: ['error'],
properties: [
new OA\Property(
property: "error",
required: ["type", "message", "file", "line"],
property: 'error',
required: ['type', 'message', 'file', 'line'],
properties: [
new OA\Property(property: "type", description: "A class de Exceção", type: "string"),
new OA\Property(property: "message", description: "A mensagem de erro", type: "string"),
new OA\Property(property: "file", description: "O arquivo que gerou o erro", type: "string"),
new OA\Property(property: "line", description: "A linha do erro", type: "integer")
new OA\Property(property: 'type', description: 'A class de Exceção', type: 'string'),
new OA\Property(property: 'message', description: 'A mensagem de erro', type: 'string'),
new OA\Property(property: 'file', description: 'O arquivo que gerou o erro', type: 'string'),
new OA\Property(property: 'line', description: 'A linha do erro', type: 'integer')
],
type: "object"
type: 'object'
)
],
type: "object"
type: 'object'
)]
class OpenApiSpec
{
Expand Down

0 comments on commit f9e6e3e

Please sign in to comment.