Skip to content
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

GSB API OpenAPI #137

Merged
merged 9 commits into from
Mar 9, 2023
Merged

GSB API OpenAPI #137

merged 9 commits into from
Mar 9, 2023

Conversation

pwalski
Copy link
Contributor

@pwalski pwalski commented Feb 15, 2023

@nieznanysprawiciel
Copy link
Contributor

@stranger80 Please look at this specification update

App -->> Backend: WS Event: Close<br>CloseCode: Abnormal
end

Note right of Backend: Canceling GSB request<br> on WS Close
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Decided to cancel pending GSB requests on WS close instead of buffering them because I assume this Close might have been caused by this GSB requests, so resending it could create a crash loop.

Copy link
Contributor

@stranger80 stranger80 left a comment

Choose a reason for hiding this comment

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

Thank you for this precise specification.

Reviewed with some typos, one YAML update and big request to fillthe content of a dedicated GAP article (branch and PR have been added for convenience - golemfactory/golem-architecture#68)

docs/gsb_api.md Show resolved Hide resolved
specs/gsb-api.yaml Show resolved Hide resolved
specs/gsb-api-messages.yaml Outdated Show resolved Hide resolved
specs/gsb-api-messages.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
specs/gsb-api.yaml Outdated Show resolved Hide resolved
pwalski and others added 3 commits February 28, 2023 13:09
Co-authored-by: stranger80 <stranger80@users.noreply.github.com>
requestBody instead of responses typo

Co-authored-by: stranger80 <stranger80@users.noreply.github.com>
@pwalski pwalski requested a review from stranger80 March 1, 2023 13:22
@pwalski
Copy link
Contributor Author

pwalski commented Mar 6, 2023

Method's POST /services response got changed so now it returns Location header with value /{servicesId}
It is an URI relative to /services path.
Response's body field listen.links got replaced with top level servicesId (sitting alongside of listen field).
@prekucki If it is ok then PR golemfactory/yagna#2487 will be merged.
EDIT
It returns field servicesId in a plural form, because it is id for a collection of bound GSB services.
It returns both, a body with servicesId, and Location header because value of this header is not exactly correct - in case of relative form of URI it should use same protocol, which will be happen for DELETE method, but in case of GET it will be ws instead of http. The problem is we are creating WS endpoint using POST which is a bit unusual.

@pwalski pwalski merged commit 909ace3 into master Mar 9, 2023
@pwalski pwalski deleted the 2415_GSB_API branch March 15, 2023 22:56
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.

Add GSB API specs to ya-client
5 participants