Skip to content
Snippets Groups Projects

Rename SUPPORTED_SPECIFICATION_JSON_SCHEMA to SUPPORTED_SPECIFICATION_VERSION

Open Maarten Segers requested to merge issue/openapi_jsonapi-3424448:4.0.x into 4.0.x
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -713,7 +713,7 @@ class JsonApiGenerator extends OpenApiGeneratorBase {
protected function getTopLevelSchema(TopLevelDataInterface $object): array {
$schema = [
'allOf' => [
['$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_JSON_SCHEMA],
['$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_VERSION],
],
];
@@ -724,14 +724,14 @@ class JsonApiGenerator extends OpenApiGeneratorBase {
if ($data instanceof RelationshipData) {
if ($data->getCardinality() === 1) {
$schema['properties']['data'] = [
'$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_JSON_SCHEMA . '#/definitions/relationship',
'$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_VERSION . '#/definitions/relationship',
];
}
else {
$schema['properties']['data'] = [
'type' => 'array',
'items' => [
'$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_JSON_SCHEMA . '#/definitions/relationship',
'$ref' => JsonApiSpec::SUPPORTED_SPECIFICATION_VERSION . '#/definitions/relationship',
],
'unevaluatedItems' => FALSE,
];
Loading