Loading src/ImageStylesProvider.php +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ class ImageStylesProvider implements ImageStylesProviderInterface { 'meta' => [ 'rel' => static::DERIVATIVE_LINK_REL, ] + $dimensions, // This is json:api 1.1 compatible. 'rel' => static::DERIVATIVE_LINK_REL, ]; } Loading src/Plugin/jsonapi/FieldEnhancer/ImageStyles.php +48 −26 Original line number Diff line number Diff line Loading @@ -155,6 +155,9 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP */ public function getOutputJsonSchema() { return [ 'type' => 'object', 'properties' => [ 'data' => [ 'type' => 'object', 'properties' => [ 'type' => ['type' => 'string'], Loading @@ -162,8 +165,20 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP 'meta' => [ 'type' => 'object', 'properties' => [ 'height' => ['type' => 'integer'], 'width' => ['type' => 'integer'], 'height' => [ 'anyOf' => [ ['type' => 'integer'], ['type' => 'null'], ['type' => 'string'], ], ], 'width' => [ 'anyOf' => [ ['type' => 'integer'], ['type' => 'null'], ['type' => 'string'], ], ], 'alt' => [ 'anyOf' => [ ['type' => 'string'], Loading @@ -176,6 +191,9 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP ['type' => 'null'], ], ], 'imageDerivatives' => [ 'type' => 'object', 'properties' => [ 'links' => [ 'type' => 'object', 'patternProperties' => [ Loading @@ -183,12 +201,16 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP 'type' => 'object', 'properties' => [ 'href' => ['type' => 'string', 'format' => 'uri'], 'meta' => [ 'type' => 'object', 'properties' => [ 'rel' => [ 'type' => 'array', 'items' => ['type' => 'string', 'format' => 'uri'], 'type' => 'string', ], 'title' => [ 'type' => 'string', ], 'type' => [ 'type' => 'string', ], ], ], ], ], Loading Loading
src/ImageStylesProvider.php +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ class ImageStylesProvider implements ImageStylesProviderInterface { 'meta' => [ 'rel' => static::DERIVATIVE_LINK_REL, ] + $dimensions, // This is json:api 1.1 compatible. 'rel' => static::DERIVATIVE_LINK_REL, ]; } Loading
src/Plugin/jsonapi/FieldEnhancer/ImageStyles.php +48 −26 Original line number Diff line number Diff line Loading @@ -155,6 +155,9 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP */ public function getOutputJsonSchema() { return [ 'type' => 'object', 'properties' => [ 'data' => [ 'type' => 'object', 'properties' => [ 'type' => ['type' => 'string'], Loading @@ -162,8 +165,20 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP 'meta' => [ 'type' => 'object', 'properties' => [ 'height' => ['type' => 'integer'], 'width' => ['type' => 'integer'], 'height' => [ 'anyOf' => [ ['type' => 'integer'], ['type' => 'null'], ['type' => 'string'], ], ], 'width' => [ 'anyOf' => [ ['type' => 'integer'], ['type' => 'null'], ['type' => 'string'], ], ], 'alt' => [ 'anyOf' => [ ['type' => 'string'], Loading @@ -176,6 +191,9 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP ['type' => 'null'], ], ], 'imageDerivatives' => [ 'type' => 'object', 'properties' => [ 'links' => [ 'type' => 'object', 'patternProperties' => [ Loading @@ -183,12 +201,16 @@ class ImageStyles extends ResourceFieldEnhancerBase implements ContainerFactoryP 'type' => 'object', 'properties' => [ 'href' => ['type' => 'string', 'format' => 'uri'], 'meta' => [ 'type' => 'object', 'properties' => [ 'rel' => [ 'type' => 'array', 'items' => ['type' => 'string', 'format' => 'uri'], 'type' => 'string', ], 'title' => [ 'type' => 'string', ], 'type' => [ 'type' => 'string', ], ], ], ], ], Loading