Example #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="OasOperation"/> class.
 /// </summary>
 /// <param name="tags">The list of tags for API documentation control.</param>
 /// <param name="summary">The short summary of what the operation does.</param>
 /// <param name="description">The verbose explanation of the operation behavior.</param>
 /// <param name="externalDocumentation">The additional external documentation for this operation.</param>
 /// <param name="operationIdentifier">The unique string used to identify the operation.</param>
 /// <param name="parameters">The list of parameters that are applicable for this operation.</param>
 /// <param name="requestBody">The request body applicable for this operation.</param>
 /// <param name="responses">The list of possible responses as they are returned from executing this operation.</param>
 /// <param name="callbacks">The map of possible out-of band callbacks related to the parent operation.</param>
 /// <param name="options">The flags that indicate what options are set on the operation.</param>
 /// <param name="security">The declaration of which security mechanisms can be used for this operation.</param>
 /// <param name="servers">The alternative server list to service this operation.</param>
 public OasOperation(
     IReadOnlyList <string> tags = default,
     string summary     = default,
     string description = default,
     OasExternalDocumentation externalDocumentation = default,
     string operationIdentifier = default,
     IReadOnlyDictionary <OasParameterKey, OasReferable <OasParameterBody> > parameters = default,
     OasReferable <OasRequestBody> requestBody = default,
     IReadOnlyDictionary <OasResponseKey, OasReferable <OasResponse> > responses = default,
     IReadOnlyDictionary <string, OasReferable <OasCallback> > callbacks         = default,
     OasOperationOptions options = default,
     IReadOnlyList <OasSecurityScheme> security = default,
     IReadOnlyList <OasServer> servers          = default)
 {
     Tags                  = tags ?? Array.Empty <string>();
     Summary               = summary;
     Description           = description;
     ExternalDocumentation = externalDocumentation;
     OperationIdentifier   = operationIdentifier;
     Parameters            = parameters ?? ImmutableDictionary <OasParameterKey, OasReferable <OasParameterBody> > .Empty;
     RequestBody           = requestBody;
     Responses             = responses ?? ImmutableDictionary <OasResponseKey, OasReferable <OasResponse> > .Empty;
     Callbacks             = callbacks ?? ImmutableDictionary <string, OasReferable <OasCallback> > .Empty;
     Options               = options;
     Security              = security ?? Array.Empty <OasSecurityScheme>();
     Servers               = servers ?? Array.Empty <OasServer>();
 }
Example #2
0
 public MockOasOperation(
     IReadOnlyList <string> tags = default,
     string summary     = default,
     string description = default,
     OasExternalDocumentation externalDocumentation = default,
     string operationIdentifier = default,
     IReadOnlyDictionary <OasParameterKey, OasReferable <OasParameterBody> > parameters = default,
     OasReferable <OasRequestBody> requestBody = default,
     IReadOnlyDictionary <OasResponseKey, OasReferable <OasResponse> > responses = default,
     IReadOnlyDictionary <string, OasReferable <OasCallback> > callbacks         = default,
     OasOperationOptions options = default,
     IReadOnlyList <OasSecurityScheme> security = default,
     IReadOnlyList <OasServer> servers          = default,
     ulong?operationId = default)
     : base(tags, summary, description, externalDocumentation, operationIdentifier, parameters, requestBody, responses, callbacks, options, security, servers)
 {
     OperationId = operationId;
 }