-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Discussion] Conventions for fluent model Javadocs #731
Comments
public interface Update ... will always ... extends Appliable<Pet>, Resource.UpdateWithTags<Update>, ... |
likewise: interface DefinitionCreatable extends
Creatable<Pet>,
Resource.DefinitionWithTags<DefinitionCreatable>, ... { |
Updated. |
The comment pattern we follow for type representing a resource is:
e.g. /**
* An immutable client-side representation of an Azure pet.
*/
public interface Pet { For a resource collection, it is:
e.g. /**
* Entry point to pet management API.
*/
public interface Pets { |
It will be good to add javadoc convention we follow for Manager types. For example: /**
* Entry point to Azure petstore resource management.
*/
public final class PetstoreManager {
/**
* Get a Configurable instance that can be used to create PetstoreManager with optional configuration.
*
* @return Configurable
*/
public static Configurable configure() {
...
}
/**
* Creates an instance of PetstoreManager that exposes Petstore resource management API entry points.
*
* @param credentials the credentials to use
* @param subscriptionId the subscription
* @return the PetstoreManager
*/
public static ComputeManager authenticate(ServiceClientCredentials credentials, String subscriptionId) {
....
}
/**
* Creates an instance of PetstoreManager that exposes Petsore resource management API entry points.
*
* @param restClient the RestClient to be used for API calls.
* @param subscriptionId the subscription
* @return the PetstoreManager
*/
public static PetstoreManager authenticate(RestClient restClient, String subscriptionId) {
...
}
public interface Configurable extends AzureConfigurable<Configurable> {
/**
* Creates an instance of PetstoreManager that exposes Petstore resource management API entry points.
*
* @param credentials the credentials to use
* @param subscriptionId the subscription
* @return the PetstoreManager
*/
PetstoreManager authenticate(ServiceClientCredentials credentials, String subscriptionId);
}
....
/**
* @return the pet resource management API entry point
*/
public Pets pets() {
....
}
} |
Great! updated. |
Below is copied from the PR comment #730, can we include this as well?
|
regarding #2 -- something tells me javadocs should not be in the business of explaining how Azure works and what the recommended Azure usage practices are. That documentation I think belongs in Azure, not in a language-specific Javadoc. In that light, I think that Javadoc should just say: @return a reference to the availability set an Azure virtual machine associated with. (speaking of which - we may want to think about whether we could/should avoid returning SubResources in such reference situations but instead return an actual object, i.e. AvailabilitySet in this case...) |
Beta2 released. |
Add new API version to README files.
Add new API version to README files.
This is a living discussion for the Javadoc conventions. Please feel free to comment and we will update the templates when appropriate.
License header
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
Models
Pet
Pet.DefinitionBlank
Pet.DefinitionWithBreed
Pet.DefinitionCreatable
Pet.Update
Collections (Operations)
Pets
Resource manager
PetStore Manager
The text was updated successfully, but these errors were encountered: