microsoft / microsoft/typespec
Poor operation template documentation
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
`op Azure.Core.ResourceOperations.ResourceCreateOrReplace(apiVersion: string, resource: TResource): (anonymous model) | (anonymous model) | TErrorResponse`
Note the two instances of `(anonymous model)`. This isn't helpful for users.
Here is the actual source:
```
interface ResourceOperations<
InterfaceTraits,
TErrorResponse = Azure.Core.Foundations.ErrorResponse
> {
/**
* Create or replace operation template.
* @template TResource Resource type.
* @template Traits Object describing the traits of the operation.
*/
@createsOrReplacesResource(TResource)
ResourceCreateOrReplace<
TResource extends object,
Traits extends object = {}
> is Foundations.ResourceOperation<
TResource,
Foundations.ResourceBody &
TraitProperties<
Traits & InterfaceTraits,
TraitLocation.Parameters,
TraitContext.Create | TraitContext.Update
>,
Foundations.ResourceCreatedOrOkResponse>,
Traits & InterfaceTraits,
TErrorResponse
>;
```
Presumably the two anonymous models are the `ResourceCreated` and `OkResponse` models.
Contributor guide
Assessment
This issue has not been assessed yet.