Created
February 20, 2019 12:07
-
-
Save superbiche/7cbf2f24c395892577971ec904496709 to your computer and use it in GitHub Desktop.
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
diff --git a/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php b/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php | |
index d1a8553..a953bdf 100644 | |
--- a/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php | |
+++ b/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php | |
@@ -46,7 +46,7 @@ class SchemataSchemaNormalizer extends JsonApiNormalizerBase { | |
'type' => 'string', | |
'title' => 'type', | |
'description' => t('Resource type'), | |
- 'enum' => [$resource_type->getTypeName()] | |
+ 'enum' => [$resource_type ? $resource_type->getTypeName() : $entity->getEntityTypeId()] | |
], | |
'id' => [ | |
'type' => 'string', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment