This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
fix: updating the ResponseSchemaBody for the async flattenSchema changes #999
Merged
Conversation
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
erunion
added
type:bug
Something isn't working
type:refactor
Issues about tackling technical debt
labels
Oct 20, 2020
erunion
commented
Oct 21, 2020
gratcliff
reviewed
Oct 21, 2020
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.
Looks good overall! Just one question below:
const { flattenedSchema } = this.state; | ||
|
||
let rows = []; | ||
if (flattenedSchema) { |
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.
Are we sure this'll always be iterable?
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.
Yeah flattenedArray
on line 39 where this state prop is set will always return an array.
darrenyong
approved these changes
Oct 21, 2020
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.
Tested with the spec and renders without an error!
erunion
added a commit
that referenced
this pull request
Oct 21, 2020
…ges (#999) * fix: updating the ResponseSchemaBody for the async flattenSchema changes * chore(deps): upgrading oas to 4.1.0 * chore(deps): bumping oas to 5.0.0
erunion
added a commit
that referenced
this pull request
Oct 21, 2020
* chore: wip integrating ui into explorer * feat(tutorials): preliminary integration work for tutorials in explorer - @readme/ui v1.10.0 (webpack) - General tutorial structure - TODO: context consumption from ui * fix: lint issues * chore: fixing latent conflict * feat(tutorials): ui lib upgrade - Bringing in babel fix for classname references - Adding variable provider * style(tutorials): add container styling * chore: forcing ci to hoist deps * chore: removing dev-focused tutorials * chore: re-running npm install to fix dep issues * ci: hoisting deps up on installation * fix: pinning the oas dep to 4.0.0 as 4.1.0 was a breaking change * feat: adding an experiment to the demo app for tutorials * fix(tutorials): responding to review comments - Fixing tutorial object for demo consumption - Checking doc.tutorials.length prior to implementing styled div * feat: set default javascript target to use fetch instead of xhr (#1000) In the same vain as 4bf7464 * fix: updating the ResponseSchemaBody for the async flattenSchema changes (#999) * fix: updating the ResponseSchemaBody for the async flattenSchema changes * chore(deps): upgrading oas to 4.1.0 * chore(deps): bumping oas to 5.0.0 * chore: re-running hoisting * fix: disabling tutorials by default until it's fully launched Co-authored-by: Tony Li <runnabro@users.noreply.github.com> Co-authored-by: Jon Ursenbach <jon@ursenba.ch> Co-authored-by: domharrington <domharrington@users.noreply.github.com> Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧰 What's being changed?
With readmeio/oas#292,
oas/tooling/lib/flattenSchema
is now an async library to enable us to properly handle circular$ref
pointers when flattening a response in theResponseSchemaBody
component.This change updates the
ResponseSchemaBody
component to be compatible with the changes incoming in readmeio/oas#292.🧪 Testing
Here's an example of a circular ref'd schema that's currently failing when we're flattening the response schema: http://bin.readme.com/s/5f8f6eec31f4240024e73488