|
@@ -8175,17 +8175,13 @@ namespace Tqdev\PhpCrudApi\OpenApi {
|
8175
|
8175
|
return sprintf('%s://%s%s/%s', $protocol, $host, $port, $path);
|
8176
|
8176
|
}
|
8177
|
8177
|
|
8178
|
|
- public function build() /*: void */
|
|
8178
|
+ public function build(): OpenApiDefinition
|
8179
|
8179
|
{
|
8180
|
8180
|
$this->openapi->set("openapi", "3.0.0");
|
8181
|
8181
|
if (!$this->openapi->has("servers") && isset($_SERVER['REQUEST_URI'])) {
|
8182
|
8182
|
$this->openapi->set("servers|0|url", $this->getServerUrl());
|
8183
|
8183
|
}
|
8184
|
8184
|
$this->records->build();
|
8185
|
|
- }
|
8186
|
|
-
|
8187
|
|
- public function getDefinition(): OpenApiDefinition
|
8188
|
|
- {
|
8189
|
8185
|
return $this->openapi;
|
8190
|
8186
|
}
|
8191
|
8187
|
}
|