Skip to content

feat(151, oas): add an openapi extension for x-aep-long-running-operation #24

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

Closed
wants to merge 1 commit into from

Conversation

toumorokoshi
Copy link
Member

Clients will have to do significant inference around things like response types without additional documentation the client.

This change adds the minimally required information, but is designed to allow additional properties (perhaps things like timeouts) in the schema.

…tion

Clients will have to do significant inference around things like response types 
without additional documentation the client. 

This change adds the minimally required information, but is designed to allow additional
properties (perhaps things like timeouts) in the schema.
Comment on lines +22 to +25
x-aep-long-running-operation:
response:
schema:
$ref: https://aep.dev/json-schema/type/operation.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the protobuf world already has a pattern here, including the "response_type" extension:

rpc WriteBook(WriteBookRequest) returns (aep.api.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=publishers/*}/books:write"
      body: "*"
    };
    option (aep.api.operation_info) = {
      response_type: "WriteBookResponse"
      metadata_type: "WriteBookMetadata"
    };
  }

I think we're going to need to reconcile this.

At minimum, the values contained in both annotations must be the same so we can map them 1-1.

Additionally, it would be great if the names themselves could match. however, that seems difficult to do if we are going to be idiomatic, as the concept of a "type" in proto (really the message) would be called a "schema" in the json-schema / openapi world.

@toumorokoshi
Copy link
Member Author

closing in favor of #27, which works off of a fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant