profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/paulatulis/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
paulatulis Engineer at Stoplight. Flatiron School grad.
PullRequestReviewEvent
CommitCommentEvent
PullRequestReviewEvent

Pull request review commentstoplightio/elements

Fix: page hangs for big Model examples

 export const generateExamplesFromJsonSchema = (schema: JSONSchema7): Example[] =     return examples;   } -  const generated = Sampler.sample(schema, {-    maxSampleDepth: 4,-  });+  try {+    const generated = Sampler.sample(schema, {+      maxSampleDepth: 4,

Okay argument for leaving maxSampleDepth :) am spot checking this and testing with the shopware API when maxSampleDepth is removed, and I can't seem to ever get to an example where I have the option to load more. It always throws me the 'Example cannot be created for this schema' message. Leaving maxSampleDepth allows sampler to load enough to get past the 500 line mark and then you'll be able to see the option to click open on large models like aclRole or category or whatever. Apologies for my confusion!

mmiask

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentstoplightio/elements

Fix: page hangs for big Model examples

 export const generateExamplesFromJsonSchema = (schema: JSONSchema7): Example[] =     return examples;   } -  const generated = Sampler.sample(schema, {-    maxSampleDepth: 4,-  });+  try {+    const generated = Sampler.sample(schema, {+      maxSampleDepth: 4,

I think I am just a bit confused since having this set at 4 will make it so that examples do not hang ever since they will only go 4 levels deep. But based on this thread, I think it's actually fine to keep for now and when/if we get complaints, we can change it to ticks. I personally don't have a strong opinion, though!

mmiask

comment created time in 7 days

Pull request review commentstoplightio/elements

Fix: page hangs for big Model examples

 export const generateExamplesFromJsonSchema = (schema: JSONSchema7): Example[] =     return examples;   } -  const generated = Sampler.sample(schema, {-    maxSampleDepth: 4,-  });+  try {+    const generated = Sampler.sample(schema, {+      maxSampleDepth: 4,

Okay correct me if I am wrong, but I thought the point of the work in json-schema-sampler was so that we could remove this maxSampleDepth and change it to ticks.

mmiask

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventstoplightio/elements

Michael Miaskowski

commit sha ddb5538ea69d946c47545e9b8cf75c7fdc2016f1

Fix: Missing array enum item definitions in query parameters (#1783) * fix: missing array enum item definitions in operation parameters * test: update tests * fix: change back variable type

view details

paulatulis

commit sha 1ef9603935c5bd342dd6a9b2de4fcb2b7ef7a2de

Merge branch 'main' into fix/mdv-code-component

view details

push time in 23 days

PullRequestReviewEvent

pull request commentstoplightio/elements

Fix: Missing array enum item definitions in query parameters

I am likely not testing this out right, but I pasted the above example verbatim under paths/parameters in simpleApiWithoutDescription, and I see the following: Screen Shot 2021-09-27 at 1 45 58 PM

Any suggestions for me in how I can reproduce the fix?

mmiask

comment created time in 23 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventstoplightio/elements

paulatulis

commit sha efce3a942a9325dd2226508ee7185e6060ec3d17

fix: allow large specs to load schema examples (#1770) * fix: allow large specs to load schema * chore: lint fix * Chore: add maxSampleDepth * chore: bump json-schema-sampler

view details

paulatulis

commit sha 2173b8c77a0d59577943d2784a3b1273e4804380

Merge branch 'main' into release

view details

push time in a month

push eventstoplightio/elements

paulatulis

commit sha efce3a942a9325dd2226508ee7185e6060ec3d17

fix: allow large specs to load schema examples (#1770) * fix: allow large specs to load schema * chore: lint fix * Chore: add maxSampleDepth * chore: bump json-schema-sampler

view details

push time in a month

delete branch stoplightio/elements

delete branch : fix/large-schema-loading

delete time in a month

PR merged stoplightio/elements

Reviewers
fix: allow large specs to load schema

Addresses #7923

Before: page becomes unresponsive when clicking around to models with circular refs

After: 2021-09-16 11 41 45

+9 -6

9 comments

3 changed files

paulatulis

pr closed time in a month

push eventstoplightio/elements

Jakub Jankowski

commit sha 3ca3c9b8d13b579a842b1e5e9e18d44c25ae8ade

fix: skip content type for multipart request (#1778)

view details

paulatulis

commit sha 19993e5575a14362e039cfd9ce7c0597c7e54ef6

Merge branch 'main' into fix/large-schema-loading

view details

push time in a month

push eventstoplightio/elements

Nauman

commit sha a0ee621fc19c445b72d6ed6ee9edf77b0bdeeb26

Adds search to TOC (#1771)

view details

paulatulis

commit sha e17d1ed87b510b6ed21417fb7974f9ca71c9e18a

Merge branch 'main' into fix/large-schema-loading

view details

push time in a month

push eventstoplightio/elements

paulatulis

commit sha 7766a05558c22b53e9d0baf948024abb97cca3e8

chore: bump json-schema-sampler

view details

push time in a month

push eventstoplightio/json-schema-sampler

paulatulis

commit sha 0296c01d9bdd7649e3de604184c40c8b6be08f5c

chore: bump version

view details

push time in a month

pull request commentstoplightio/elements

fix: allow large specs to load schema

../packages/elements-core/src/utils/exampleGeneration.ts:82:5 - error TS2345: Argument of type '{ maxSampleDepth: number; }' is not assignable to parameter of type 'Options'.
  Object literal may only specify known properties, and 'maxSampleDepth' does not exist in type 'Options'.

82     maxSampleDepth: 4,
       ~~~~~~~~~~~~~~~~~


Found 1 error.

🤔

This is because json-schema-sampler hasn't been released yet after this PR was just approved. It still thinks this is not a prop.

paulatulis

comment created time in a month

push eventstoplightio/json-schema-sampler

paulatulis

commit sha 062469d7d39354bba71ebf6368b3923112ee88ce

fix: address circular reference traversal slowdown (#20) * fix: address circular reference traversal slowdown * chore: update comment

view details

push time in a month

PR merged stoplightio/json-schema-sampler

fix: address circular reference traversal slowdown

Related to #7923

Will affect #1770

  • Exposes maxSampleDepth as prop to sample()
  • Removes check for context before looking for circular references
+7 -7

0 comment

3 changed files

paulatulis

pr closed time in a month

delete branch stoplightio/json-schema-sampler

delete branch : fix/uncover-maxSampleDepth

delete time in a month

push eventstoplightio/elements

Michael Miaskowski

commit sha 9155e4b55c0a02a645c604bbd633f525e99d8b34

feat: allow pausing getNodes query by passing prop (#1773) * feat: allow pausing getNodes query by passing prop * fix: address review comment

view details

William Hilton

commit sha bf6175af083b873a50328396bcac9f75a1f14611

fix: remove unnecessary logic (#1774)

view details

Michael Miaskowski

commit sha f575cd802de0c36bfbdf64cca735212280a603bc

chore: release elements-dev-portal 1.4.0 (#1775)

view details

paulatulis

commit sha 6710b7b76be7434d1797d4be44dc0ea0806c140d

Merge branch 'main' into fix/large-schema-loading

view details

push time in a month

pull request commentstoplightio/elements

fix: allow large specs to load schema

Did we figure out whether the issue was circular refs or just "big models"? because limiting the depth to 4 seems to imply it's big models.

@wmhilton I don't think we confirmed one way or the other. Could it not be that it's both?

Also, if we don't limit this number, won't the example be extremely long to the point someone is scrolling forever? Is it helpful from a product standpoint to have such a long example?

paulatulis

comment created time in a month

PullRequestReviewEvent