-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Ready to MERGE] Swagger for Tenant Properties API #5038
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5d3784a
added swagger for Tenant Properties
38018ad
Fixed camel casing in billing.json file
c81e213
Update billing.json
33d848a
changes in DiscoverTenants contracts
5c877c2
billing.Json trim blank space
c736ede
Update billing.json
7a96d09
removal of plural name
eab3b0f
Updating the route
b6137f4
Moved Swagger for Discover Tenants from billing to consumption
53fb8f8
Change in Namespace followed by one additional parameter "billingAcco…
b405815
Change of method name from discoverTenants to tanants.
42f98d2
changes ion response type
0d55ad6
added name after Id. Code review implementation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update billing.json
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As billingProfileId is mandatory, this is likely better served by a POST action request where the billingProfileId is passed in the request body. See this for an example
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.
This API is designed for Power BI custom connector to achieve multi-tenancy. This design is approved by connector Team. It is a request flow which brings Tenant Id for a specified billingProfileId input. API is doing a tenant discovery and that's why it is named as "DiscoverTenant". I hope this clarifies your question.
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.
This URL is not compliant with the Resource Provider Contract. It behaves as an action (POST) but is expressed as if it were a collection enumeration. To make this compliant with the RPC, you can model this as a POST/action, or this could be expressed as a normal collection enumeration:
`/providers/Microsoft.Billing/billingProfiles/{billingProfileId}/tenants/
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.
Changes in swagger are committed to making the URL compliant with the Resource Provider Contract. The new URL is
'/providers/Microsoft.Billing/billingProfiles/{billingProfileId}/discoverTenants'
I am keeping the name discoverTenants as the sole purpose of this API is to discover the Tenants only. As all the review comments are implemented can you please mark this approve.
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.
thank you for these changes. This path is syntactically correct. The resource type name in this case would be "discoverTenants" which is a bit odd, as verbs are atypical in a resource type name. I would prefer it to be named with a noun pattern for consistency.
discoveredTenantswould be substantially preferable in my opinion.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 have done changes in resource type name from "discoverTenants" to "tenants" now.