Skip to content

Update BYON-CallHandling-Service.yaml#28

Merged
TEF-RicardoSerr merged 6 commits intocamaraproject:mainfrom
JavierVillaLabarra:Develop
May 7, 2024
Merged

Update BYON-CallHandling-Service.yaml#28
TEF-RicardoSerr merged 6 commits intocamaraproject:mainfrom
JavierVillaLabarra:Develop

Conversation

@JavierVillaLabarra
Copy link
Contributor

Responding to the #issue24 proposed by @deepakjaiswal1

We have added a 201 type response wich is returning a JSON object regarding the session parameters.

Feel free to add comments

@TEF-RicardoSerr
@pradeepachar-mavenir
@sushanthmavenir

@deepakjaiswal1
Copy link
Collaborator

@TEF-RicardoSerr @JavierVillaLabarra I believe it's unnecessary to include {status: 201, code: CREATED} in the responseBody for a 201 created response.

Updated CallHandlig yaml
@JavierVillaLabarra
Copy link
Contributor Author

JavierVillaLabarra commented Feb 29, 2024

@TEF-RicardoSerr @JavierVillaLabarra I believe it's unnecessary to include {status: 201, code: CREATED} in the responseBody for a 201 created response.

I updated the yaml file, you can check it!
thanks

@deepakjaiswal1
Copy link
Collaborator

@JavierVillaLabarra I think we can omit the ObjectResponse schema. I would update Gereric201

FROM:
Generic201:
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectResponse'
examples:
SessionCreatedMT183:
$ref: '#/components/examples/exMT201_183'
SessionCreatedMT200:
$ref: '#/components/examples/exMT201_200'

TO:
Generic201:
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ReceiverSessionStatus'
examples:
SessionCreatedMT183:
$ref: '#/components/examples/exMT201_183'
SessionCreatedMT200:
$ref: '#/components/examples/exMT201_200'

application/json:
schema:
$ref: '#/components/schemas/ReceiverSessionStatus'
examples:
Copy link
Contributor

Choose a reason for hiding this comment

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

These examples are not relevant here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you find it good to have a response type attached in the 201 response? how'd you face this in other way?

Copy link
Contributor

Choose a reason for hiding this comment

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

201 Created is to convey to client that the request is accepted, and resource is created on WebRTC Gateway. After 201, the gateway shall initiate the SIP transactions towards the network, based on transactions, subsequent notification shall be sent.
My point was, listing exMT201_183 and exMT201_200 to be removed.

@deepakjaiswal1
Copy link
Collaborator

@pradeepachar-mavenir @TEF-RicardoSerr @JavierVillaLabarra The PUT response should return a 200 OK status code, with the response body reflecting the updated session object. No new session object is being created, and thus status code 201 Created is not applicable.

@TEF-RicardoSerr
Copy link
Contributor

Hello @deepakjaiswal1 @pradeepachar-mavenir
Just made the new commit, please check if it is aligned with your thoughts

@TEF-RicardoSerr TEF-RicardoSerr merged commit 6eaa474 into camaraproject:main May 7, 2024
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.

4 participants