-
Notifications
You must be signed in to change notification settings - Fork 162
Fixes #420 - Add REST invocation function definition based on OpenAPI Path Object #652
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,23 +36,23 @@ | |
"pattern": "^[a-z0-9](-?[a-z0-9])*$" | ||
}, | ||
"operation": { | ||
"type": "string", | ||
"description": "If type is `rest`, <path_to_openapi_definition>#<operation_id>. If type is `asyncapi`, <path_to_asyncapi_definition>#<operation_id>. If type is `rpc`, <path_to_grpc_proto_file>#<service_name>#<service_method>. If type is `graphql`, <url_to_graphql_endpoint>#<literal \\\"mutation\\\" or \\\"query\\\">#<query_or_mutation_name>. If type is `odata`, <URI_to_odata_service>#<Entity_Set_Name>. If type is `expression`, defines the workflow expression.", | ||
"minLength": 1 | ||
"type": "object", | ||
"$ref": "#/definitions/operation" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest`", | ||
"description": "Defines the function type. Is either `rest`, `openapi`,`asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `openapi`.", | ||
"enum": [ | ||
"rest", | ||
"openapi", | ||
"asyncapi", | ||
"rpc", | ||
"graphql", | ||
"odata", | ||
"expression", | ||
"custom" | ||
], | ||
"default": "rest" | ||
"default": "openapi" | ||
}, | ||
"authRef": { | ||
"oneOf": [ | ||
|
@@ -65,14 +65,14 @@ | |
{ | ||
"type": "object", | ||
"description": "Configures both the auth definition used to retrieve the operation's resource and the auth definition used to invoke said operation", | ||
"properties":{ | ||
"resource":{ | ||
"properties": { | ||
"resource": { | ||
"type": "string", | ||
"description": "References an auth definition to be used to access the resource defined in the operation parameter", | ||
"minLength": 1, | ||
"pattern": "^[a-z0-9](-?[a-z0-9])*$" | ||
}, | ||
"invocation":{ | ||
"invocation": { | ||
"type": "string", | ||
"description": "References an auth definition to be used to invoke the operation" | ||
} | ||
|
@@ -93,6 +93,25 @@ | |
"name", | ||
"operation" | ||
] | ||
}, | ||
"operation": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"description": "If type is `openapi`, <path_to_openapi_definition>#<operation_id>. If type is `asyncapi`, <path_to_asyncapi_definition>#<operation_id>. If type is `rpc`, <path_to_grpc_proto_file>#<service_name>#<service_method>. If type is `graphql`, <url_to_graphql_endpoint>#<literal \\\"mutation\\\" or \\\"query\\\">#<query_or_mutation_name>. If type is `odata`, <URI_to_odata_service>#<Entity_Set_Name>. If type is `expression`, defines the workflow expression.", | ||
"minLength": 1 | ||
}, | ||
{ | ||
"type": "object", | ||
"description": "OpenAPI Path Object definition", | ||
ricardozanini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"$comment": "https://spec.openapis.org/oas/v3.1.0#paths-object", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i dont think we use schema 7.x comments anywhere do we? maybe can just put in description and try to be version independent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have been using schema 7.x since the beginning, and I don't think it will break anything. Additionally, schema 7.x is from March 2018. Honestly, I don't see why we should not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tsurdilo Any further toughts? If not, please resolve ;) |
||
"patternProperties": { | ||
"^/": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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 dont think this is right. we should find a way to restrict object type on the value of type property please.
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.
also description if object type should add something like "added only for rest type"
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 don't think so. The
AuthRef
object can be applied to any remote invocation such as gRPC, GraphQL, openapi, rest, odata, etc.If we would make this change, I'd say to do it in another PR. There's no change here apart from the formatting and the default to
openapi
type.Uh oh!
There was an error while loading. Please reload this page.
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.
Resolved? I personally agree with @ricardozanini on this one!