Skip to content
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

fix: generate jsdocs for operations with no documentation #971

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Sep 27, 2023

fixes aws/aws-sdk-js-v3#5037

due to a conditional, operations with no documentation trait do not write out the default documentation additions either

(the structural type hints, example, release tags)

This PR makes the commands have at least a default documentation even when none exists in the model.

  • JSv3 codegen testing

@kuhe kuhe marked this pull request as ready for review September 28, 2023 15:35
@kuhe kuhe requested review from a team as code owners September 28, 2023 15:35
@kuhe
Copy link
Contributor Author

kuhe commented Sep 28, 2023

Example for ExportApi operation in apigatewayv2 in the AWS SDK for JSv3

/**
 * @public
 *
 * @example
 * Use a bare-bones client and the command you need to make an API call.
 * ```javascript
 * import { ApiGatewayV2Client, ExportApiCommand } from "@aws-sdk/client-apigatewayv2"; // ES Modules import
 * // const { ApiGatewayV2Client, ExportApiCommand } = require("@aws-sdk/client-apigatewayv2"); // CommonJS import
 * const client = new ApiGatewayV2Client(config);
 * const input = { // ExportApiRequest
 *   ApiId: "STRING_VALUE", // required
 *   ExportVersion: "STRING_VALUE",
 *   IncludeExtensions: true || false,
 *   OutputType: "STRING_VALUE", // required
 *   Specification: "STRING_VALUE", // required
 *   StageName: "STRING_VALUE",
 * };
 * const command = new ExportApiCommand(input);
 * const response = await client.send(command);
 * // { // ExportApiResponse
 * //   body: "BLOB_VALUE",
 * // };
 *
 * ```
 *
 * @param ExportApiCommandInput - {@link ExportApiCommandInput}
 * @returns {@link ExportApiCommandOutput}
 * @see {@link ExportApiCommandInput} for command's `input` shape.
 * @see {@link ExportApiCommandOutput} for command's `response` shape.
 * @see {@link ApiGatewayV2ClientResolvedConfig | config} for ApiGatewayV2Client's `config` shape.
 *
 * @throws {@link BadRequestException} (client fault)
 *  <p>The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
 *
 * @throws {@link NotFoundException} (client fault)
 *  <p>The resource specified in the request was not found. See the message field for more information.</p>
 *
 * @throws {@link TooManyRequestsException} (client fault)
 *  <p>A limit has been exceeded. See the accompanying error message for details.</p>
 *
 * @throws {@link ApiGatewayV2ServiceException}
 * <p>Base exception class for all service exceptions from ApiGatewayV2 service.</p>
 *
 */

(compared to empty docs currently)

@kuhe kuhe merged commit f574977 into smithy-lang:main Sep 28, 2023
@kuhe kuhe deleted the fix/docs branch September 28, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExportApiCommand returns an error screen on the apigatewayv2 docs
3 participants