zapier / zapier-platform

The SDK for you to build an integration on Zapier

Home Page:https://platform.zapier.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusing examples and anti-examples

colesimmons opened this issue · comments

Consider the examples and anti-examples for ResourceMethodCreateSchema.

Screen Shot 2020-10-20 at 2 49 57 PM

The only difference between the 2nd example and the anti-example is the presence of hidden in display, which is a valid key for BasicDisplaySchema.

Hey @colesimmons! I think I can clarify this one. The focus here is that an operation.sample is required unless display.hidden is true. That nuance is covered in the description of BasicActionOperationSchema.

What does a sample of data look like? Will use resource sample if missing. Requirement waived if display.hidden is true or if this belongs to a resource that has a top-level sample

@codebycaleb Ah, thanks Caleb! That makes sense, though I still wouldn't consider that an anti-example as it could belong to a resource that has a top-level sample.

I'll go ahead and close this since it does answer my question. I'll try to put together a PR when I have a chance that will hopefully clarify some of the points where I got stuck while working on Abstract's integration.

Appreciate that - the examples and anti-exampes are a little confusing in the first place because they're only there to show json that is either valid or invalid based on the schema. So they're not examples in the traditional sense of showing the reader a basic way to do something.