-
-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(JsonSchema): fix reDoc json sample values #5638
fix(JsonSchema): fix reDoc json sample values #5638
Conversation
@soyuka 👋 |
@soyuka hey, what about this PR? |
tests are failing |
- fix(JsonSchema): reDoc json sample values
- fix(JsonSchema): reDoc json sample values
@soyuka done. The last one seems not related to my changes. |
thanks! |
* fix(jsonschema): fix reDoc json sample values * fix(JsonSchema): reDoc json sample values * fix-redoc-json-example-values - fix(JsonSchema): reDoc json sample values * fix-redoc-json-example-values - fix(JsonSchema): reDoc json sample values
@@ -139,7 +139,7 @@ private function getClassType(?string $className, bool $nullable, string $format | |||
if (true !== $readableLink && $this->isResourceClass($className)) { | |||
return [ | |||
'type' => 'string', | |||
'format' => 'iri-reference', | |||
'format' => 'iri-template', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've a problem with that it's not in the specification: https://json-schema.org/understanding-json-schema/reference/string#resource-identifiers isn't redoc wrong?
we should fix this by introducing an example section instead imo
I reverted that. |
@soyuka you're right. We don't generate templates here but references. The patch was wrong (maybe there is a bug in ReDoc, but then ReDoc must be patched, not our code). |
I think what we need is to add examples if we really want this feature on docs. |
ok, got it. let me try to add examples then |
Actually it fixes the same bug as in that PR but for JSON.