Guidelines for azure-identity dependency, quantum group and deserialization method names (#2304)

This commit is contained in:
Srikanta 2021-01-31 21:33:51 -08:00 коммит произвёл GitHub
Родитель 137450cb78
Коммит 682feb7fb5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -10,6 +10,7 @@
| `management` | Control Plane (Azure Resource Manager) |
| `media` | Audio, video, or mixed reality |
| `messaging` | Messaging services, like push notifications or pub-sub |
| `quantum` | Quantum computing technologies |
| `search` | Search technologies |
| `security` | Security and cryptography |
| `storage` | Storage of unstructured data |

Просмотреть файл

@ -844,6 +844,8 @@ Fluent types must not be immutable. Don't return a new instance on each setter
{% include requirement/MUST id="java-models-javabeans" %} use the JavaBean naming convention of `get*`, `set*`, and `is*`.
{% include requirement/MUST id="java-models-deserialize" %} include static methods if new model instances are required to be created from raw data. The static method names should be `from<dataformat>`. For example, to create an instance of `BinaryData` from a string, include a static method called `fromString` in `BinaryData` class.
Model types sometimes exist only as an Azure service return type, and developers would never instantiate these. Often, these model types have API that is not user-friendly (in particular, overly complex constructors). It would be best for developers if they were never presented with this API in the first place, and we refer to these as 'undesirable public API'.
{% include requirement/MUST id="java-models-interface" %} put model classes that are intended as service return types only, and which have undesirable public API into the `.implementation.models` package. In its place, an interface should be put into the public-facing `.models` package, and it should be this type that is returned through the public API to end users.
@ -977,6 +979,8 @@ In addition to Azure Active Directory OAuth, services may provide custom authent
{% include requirement/MUST id="java-auth-credential-type-placement" %} define custom credential types in the same namespace and package as the client, or in a service group namespace and shared package, not in Azure Core or Azure Identity.
{% include requirement/MUSTNOT id="java-auth-azure-identity-dependency" %} take compile-scope dependency on `azure-identity` library.
{% include requirement/MUST id="java-auth-credential-type-prefix" %} prepend custom credential type names with the service name or service group name to provide clear context to its intended scope and usage.
{% include requirement/MUST id="java-auth-credential-type-suffix" %} append Credential to the end of the custom credential type name. Note this must be singular not plural.