-
Notifications
You must be signed in to change notification settings - Fork 44
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
Draft PR for Arazzo schema #198
Conversation
@LasneF it would be better to use draft 2020-12 as that's the current draft being used in current versions of OAS and Arazzo. It's also a lot easier to re-use schemas (see the 3.0 vs 3.1 OAS schemas to see the difference, although I have no idea if it will make as much of a difference with Arazzo). With the OAS schemas, they use the same draft as is referenced in the spec they describe. |
@LasneF also, thanks for starting this work! I should have said that before diving in with feedback 😅 |
I ve done a basis ,it s feature complete but with pending point How to modelize :
"inputs": {
"type": "object",
"additionalProperties": {
"type" : "object"
},
"description": "An object to hold reusable JSON Schema objects to be referenced from workflow inputs."
},
vs the OAI definition the usage of the field reference toward $ref for now skipping but it will be an easy addition then , i will follow the pattern if else and so for instance parameters:
- name: status
in: query
value: "available"
- reference: $components.parameters.page
value: 1
- reference: $components.parameters.pageSize
value: 10 I can make it compliant with either parameter = ( name & in ) Or Reference: + Value
it s not 100 % clear what type : string | Criterion Expression Type Object , with criterion type object defined as type + version it produces strange things like - context: $statusCode
condition: '^200$'
type: regex looks fair but if we consider type as an criterion expression object it gives - context: $statusCode
condition: '^200$'
type:
type : jsonpath
version : draft-goessner-dispatch-jsonpath-00 to me looks we should remove this notion and move the version in the fixed field ? "type": {
"type": "string",
"description": "The type of condition to be applied.",
"enum" : ["simple", "regex", "jsonpath", "xpath"]
} |
Just curious why do we need to add the 'additionalProperties' after defining "type": "object". Since the type is object, I think it can take any object type. By additionalProperties you probably mean attributes but I think that will be adding extra layer. But if it needs to be added, 'attributes' seems a better word. |
@jetro4u you are right, dropped , as it more simple . i am not sure how to express that it has be conform to json schema , description may be good enough |
@LasneF @jetro4u the The fully correct way to handle this is shown in the OAS 3.1 schemas and relies on |
@handrews i can reproduce the same model that is on the OAS 3.1 model
by the way thanks for pointing the OAS spec i realize that OAS did a great job by adding a $comment on most of the item will add it |
closing this PR follow up is on #224 |
this is a draft PR, it contains a basic schema that validate the samples
it is mainly reproducing the structure of Arazzo
it is not complete and should not merge , it misses the reference mechanism that i will pick up from OAS schema
and also few points are set to object , but may be we can do better