-
Notifications
You must be signed in to change notification settings - Fork 219
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
Provide custom namespace for creating things via POST route #1395
Conversation
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.
Hi @Pranshu-G and thx for your first contribution 👍
I added some comments to the added code.
Tests are still missing - at least the ThingIdTest
should get a test for providing an explicit namespace.
Missing is also enhancing the OpenAPI documentation for POST /things
here by adding a new parameter:
https://github.com/eclipse/ditto/blob/44a10bea1205eea177e8e48cbb69d0026b10509a/documentation/src/main/resources/openapi/sources/paths/things/index.yml#L80-L84
The complete OpenAPI can be built like documented here:
https://github.com/eclipse/ditto/tree/master/documentation/src/main/resources/openapi
Looking forward to the adjustments.
...ice/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java
Outdated
Show resolved
Hide resolved
things/model/src/main/java/org/eclipse/ditto/things/model/ThingBuilder.java
Outdated
Show resolved
Hide resolved
things/model/src/main/java/org/eclipse/ditto/things/model/ThingId.java
Outdated
Show resolved
Hide resolved
...ice/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java
Outdated
Show resolved
Hide resolved
For the |
No, in the existing |
Signed-off-by: Pranshu-G <pranshu.grover18@gmail.com>
Rebased and Squashed Edit: I suppose there is something wrong with the openAPI enhancement I made. |
Signed-off-by: Pranshu-G <pranshu.grover18@gmail.com>
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 added a reference to namespace
parameter to ditto-api-2.yml
but I am not sure it is reflecting the desired behavior
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.
Hi @Pranshu-G
Thanks for the adjustments - I had another look and added a "review commit".
Could you check if that is ok for you?
I just applied some formatting and fixed the OpenAPI docs by adding the "Namespace" parameter separately.
Hi @thjaeckle , the changes look fine. The OpenAPI change was necessary since I wasn't able to get the desired output there. Is the PR good to go now? |
Yes, once the build is "green" we can accept and merge it 👍 |
Signed-off-by: Pranshu-G pranshu.grover18@gmail.com
Fixes: #550 add custom namespace route.
Missing test case and documentation.