|
| 1 | +# PSSwagger work in a nutshell for Calcium semester |
| 2 | + |
| 3 | +## Enable teams/users to generate PS Cmdlets for new Azure/MAS services or any RESTful web services |
| 4 | + |
| 5 | +- Support for automatic test server |
| 6 | + |
| 7 | +- Azure CI/CD pipeline integration |
| 8 | + - Implement a PowerShell script to bootstrap the PSSwagger and its helper modules to the Azure PowerShell Repository clone. |
| 9 | + - Add support for leveraging the pre-generated C# SDK assemblies in New-PSSwaggerModule cmdlet. |
| 10 | + - Integrate with https://github.com/Azure/azure-powershell CI/CD pipeline to generate and test the PowerShell cmdlets for Azure Swagger documents (https://github.com/Azure/azure-rest-api-specs) and leverage the corresponding generated SDK assemblies from https://github.com/Azure/azure-sdk-for-net repository. |
| 11 | + |
| 12 | +## Support PS Extensions |
| 13 | + |
| 14 | +### Cmdlets |
| 15 | + |
| 16 | +#### New-PSSwaggerMetadataFile |
| 17 | + |
| 18 | +- [New-PSSwaggerMetadataFile](../commands/New-PSSwaggerMetadataFile.md) |
| 19 | + |
| 20 | +#### Test-PSSwaggerMetadataFile |
| 21 | + |
| 22 | +- Returns true or false based on validity of the PS Metadata. |
| 23 | +- Checks whether all Swagger paths, operations, definitions, parameters/property names exist in both Swagger spec and it's psmeta.json file. |
| 24 | +- This cmdlet will use New-PSSwaggerMetadataFile cmdlet with current spec copied to a temporary folder. |
| 25 | + After creating the psmeta.json file, this file at temporary folder will be used to compare the contents of current psmeta.json file. |
| 26 | +- With -Detailed switch parameter on this cmdlet user can get more details, like |
| 27 | + - What is missing (includes newly added and removed) for Paths, Operations, Parameters, Definitions, Properties, Global parameters, module info and code-generation settings, etc. |
| 28 | + - What key properties are invalid like empty value for param/cmdlet name. |
| 29 | + - These details are in hierarchical order as in psmeta file. |
| 30 | + - An additional property will be added with current metadata (psmeta.json). |
| 31 | +- Detailed output will have a property to indicate missing fields of the PS Extensions, if any. |
| 32 | +- Detailed output will have a property to indicate deprecated fields of the PS Extensions, if any. |
| 33 | +- Output format view will be added for displaying the detailed output on PS Console. |
| 34 | +- Supports pipeline input. |
| 35 | +- Cmdlet syntax |
| 36 | + ```powershell |
| 37 | + Test-PSSwaggerMetadataFile [-SwaggerSpecPath] <string> [-Detailed] |
| 38 | + ``` |
| 39 | + |
| 40 | +#### Update-PSSwaggerMetadataFile |
| 41 | + |
| 42 | +- This cmdlet updates psmeta file as per the latest contents of Swagger spec. |
| 43 | +- Removes missing elements and adds newly added elements as per new swagger spec to the psmeta file for Paths, Operations, Parameters, Definitions, Properties, Global parameters, module info and code-generation settings, etc. |
| 44 | +- High level logic |
| 45 | + - Runs Test-ModuleManifest cmdlet with -Detailed switch to check if there are any missing/new metadata. |
| 46 | + - Detailed output will be used to update the psmeta.json file. |
| 47 | + - New keys will be added and missing keys will be removed from the psmeta.json |
| 48 | + - Runs Test-ModuleManifest cmdlet again to ensure that generated psmeta file is valid. |
| 49 | +- Supports pipeline input. |
| 50 | +- Supports ShouldProcess functionality (-Confirm and -WhatIf). |
| 51 | +- Cmdlet syntax |
| 52 | + ```powershell |
| 53 | + Update-PSSwaggerMetadataFile [-SwaggerSpecPath] <string> [-Force] [-WhatIf] [-Confirm] |
| 54 | + ``` |
| 55 | + |
| 56 | +#### Support PS Extensions in New-PSSwaggerModule cmdlet |
| 57 | + |
| 58 | +- If .psmeta file exists, Test-PSSwaggerMetadataFile cmdlet will be used with -Detailed switch to validate and get the detailed psmeta details. |
| 59 | +- If swagger document contains PS Extensions, PowerShell Metadata extraction logic will give preference to PS Extensions, otherwise there will be no change to the existing implementation. |
| 60 | +- This extracted psmeta will be used in preparation of module, cmdlet, parameter, code generation settings, output formats, etc., metadata. |
| 61 | + |
| 62 | +#### Integration of PS Extensions with VS, VS Code and MSSwagger |
| 63 | + |
| 64 | +## Making PSSwagger public |
| 65 | + |
| 66 | +- Cmdlet review for three PSSwagger modules and incorporate the feedback |
| 67 | + - PSSwagger.Common.Helpers |
| 68 | + - PSSwagger.Azure.Helpers |
| 69 | + - PSSwagger |
| 70 | +- Documentation update/cleanup for all cmdlets, modules and readme.md |
| 71 | +- CI/CD pipeline integration |
| 72 | + - AppVeyor |
| 73 | + - Windows PowerShell |
| 74 | + - PowerShell Core |
| 75 | + - Travis CI |
| 76 | +- Publishing to the PSGallery |
| 77 | + - Implement required automation logic for publishing the modules to PSGallery from master branch. |
| 78 | + |
| 79 | +## Engineering quality/fundamentals |
| 80 | + |
| 81 | +- Current list of PSSwagger issues with Common and Engineering labels will be enabled/fixed in this semester after triage. |
| 82 | + - [Engineering issues](https://github.com/PowerShell/PSSwagger/issues?q=is%3Aopen+is%3Aissue+label%3AEngineering) |
| 83 | + - [Common issues](https://github.com/PowerShell/PSSwagger/issues?q=is%3Aopen+is%3Aissue+label%3ACommon) |
0 commit comments