OpenApiWorkspace.RegisterComponentForDocument<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a component for a document in the workspace
public bool RegisterComponentForDocument<T>(Microsoft.OpenApi.OpenApiDocument openApiDocument, T componentToRegister, string id);
member this.RegisterComponentForDocument : Microsoft.OpenApi.OpenApiDocument * 'T * string -> bool
Public Function RegisterComponentForDocument(Of T) (openApiDocument As OpenApiDocument, componentToRegister As T, id As String) As Boolean
Type Parameters
- T
The type of the component to register.
Parameters
- openApiDocument
- OpenApiDocument
The document to register the component for.
- componentToRegister
- T
The component to register.
- id
- String
The id of the component.
Returns
true if the component is successfully registered; otherwise false.
Exceptions
id is null or empty