Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit c83bb91

Browse files
authored
Made few changes to follow the PowerShell Best practices (#7)
- Added LICENSE, ISSUE_TEMPLATE, CONTRIBUTING and .gitignore files. - Made few changes to follow the PowerShell Best practices like approved verbs, variable names, StrictMode, etc., - Changed Namespace to include the Swagger Specification version - Module version is prepared from Swagger specification version - Generated Assembly name includes the Swagger specification version, so that same process can load the multiple versions of the same module. - Used New-Object instead of [Namespace].New() so that generated code can run on PS 3 or 4. - Updated the module manifest files with additional metadata - Removed the used of Generated.Azure.BatchManagement.StartupScript.ps1 file - Updated the PSSwagger.psm1 to not use the $Global:Parameters. - Added Write-TerminatingError utility function - Updated Readme with few additional details.
1 parent f08250e commit c83bb91

9 files changed

+553
-125
lines changed

.github/CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Contributing to PSSwagger
2+
=============================
3+
4+
Please refer to [the common contribution guidelines in PowerShell git organization](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md)

.github/ISSUE_TEMPLATE.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--- Provide a general summary of the issue in the Title above -->
2+
3+
<!--
4+
- Search the existing issues.
5+
- Fill out the following template
6+
- If it is a bug report, make sure you are able to repro it with latest PSSwagger module from master branch.
7+
-->
8+
9+
## Expected Behavior
10+
<!--- If you're describing a bug, tell us what should happen -->
11+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
12+
13+
## Current Behavior
14+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
15+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
16+
17+
## Possible Solution
18+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
19+
<!--- or ideas how to implement the addition or change -->
20+
21+
## Steps to Reproduce (for bugs)
22+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
23+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
24+
1.
25+
2.
26+
3.
27+
4.
28+
29+
## Context
30+
<!--- How has this issue affected you? What are you trying to accomplish? -->
31+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
32+
33+
## Your Environment
34+
<!--- Include at least the output from $PSVersionTable -->
35+
36+
```PowerShell
37+
38+
> $PSVersionTable
39+
40+
> Get-Module
41+
42+
> Get-Module -ListAvailable PSSwagger
43+
44+
```

.gitignore

+255
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# VS auto-generated files for csproj files
14+
*.csproj.user
15+
16+
# Project Rider IDE files
17+
.idea.powershell/
18+
19+
# Ignore executables
20+
*.exe
21+
*.msi
22+
*.appx
23+
24+
# Ignore binaries and symbols
25+
*.pdb
26+
*.dll
27+
28+
# Ignore packages
29+
*.deb
30+
*.zip
31+
*.rpm
32+
*.pkg
33+
34+
# ignore the version file as it is generated at build time
35+
powershell.version
36+
37+
# default location for produced nuget packages
38+
/nuget-artifacts
39+
40+
# generated man files
41+
/assets/powershell.1*
42+
43+
# resgen output
44+
gen
45+
46+
# Per repo profile
47+
.profile.ps1
48+
49+
#VS Code files
50+
.vscode
51+
52+
# OS X
53+
.DS_Store
54+
55+
# TestsResults
56+
TestsResults*.xml
57+
58+
# Build results
59+
[Dd]ebug/
60+
[Dd]ebugPublic/
61+
[Rr]elease/
62+
[Rr]eleases/
63+
x64/
64+
x86/
65+
build/
66+
bld/
67+
[Bb]in/
68+
[Oo]bj/
69+
70+
# Visual Studo 2015 cache/options directory
71+
.vs/
72+
73+
# MSTest test Results
74+
[Tt]est[Rr]esult*/
75+
[Bb]uild[Ll]og.*
76+
77+
# NUNIT
78+
*.VisualState.xml
79+
TestResult.xml
80+
81+
# Build Results of an ATL Project
82+
[Dd]ebugPS/
83+
[Rr]eleasePS/
84+
dlldata.c
85+
86+
# DNX
87+
project.lock.json
88+
artifacts/
89+
90+
*_i.c
91+
*_p.c
92+
*_i.h
93+
*.ilk
94+
*.meta
95+
*.obj
96+
*.pch
97+
*.pdb
98+
*.pgc
99+
*.pgd
100+
*.rsp
101+
*.sbr
102+
*.tlb
103+
*.tli
104+
*.tlh
105+
*.tmp
106+
*.tmp_proj
107+
*.log
108+
*.vspscc
109+
*.vssscc
110+
.builds
111+
*.pidb
112+
*.svclog
113+
*.scc
114+
115+
# Chutzpah Test files
116+
_Chutzpah*
117+
118+
# Visual C++ cache files
119+
ipch/
120+
*.aps
121+
*.ncb
122+
*.opensdf
123+
*.sdf
124+
*.cachefile
125+
126+
# Visual Studio profiler
127+
*.psess
128+
*.vsp
129+
*.vspx
130+
131+
# TFS 2012 Local Workspace
132+
$tf/
133+
134+
# Guidance Automation Toolkit
135+
*.gpState
136+
137+
# ReSharper is a .NET coding add-in
138+
_ReSharper*/
139+
*.[Rr]e[Ss]harper
140+
*.DotSettings.user
141+
142+
# JustCode is a .NET coding addin-in
143+
.JustCode
144+
145+
# TeamCity is a build add-in
146+
_TeamCity*
147+
148+
# DotCover is a Code Coverage Tool
149+
*.dotCover
150+
151+
# NCrunch
152+
_NCrunch_*
153+
.*crunch*.local.xml
154+
155+
# MightyMoose
156+
*.mm.*
157+
AutoTest.Net/
158+
159+
# Web workbench (sass)
160+
.sass-cache/
161+
162+
# Installshield output folder
163+
[Ee]xpress/
164+
165+
# DocProject is a documentation generator add-in
166+
DocProject/buildhelp/
167+
DocProject/Help/*.HxT
168+
DocProject/Help/*.HxC
169+
DocProject/Help/*.hhc
170+
DocProject/Help/*.hhk
171+
DocProject/Help/*.hhp
172+
DocProject/Help/Html2
173+
DocProject/Help/html
174+
175+
# Click-Once directory
176+
publish/
177+
178+
# Publish Web Output
179+
*.[Pp]ublish.xml
180+
*.azurePubxml
181+
# TODO: Comment the next line if you want to checkin your web deploy settings
182+
# but database connection strings (with potential passwords) will be unencrypted
183+
*.pubxml
184+
*.publishproj
185+
186+
# NuGet Packages
187+
*.nupkg
188+
# The packages folder can be ignored because of Package Restore
189+
**/packages/*
190+
# except build/, which is used as an MSBuild target.
191+
!**/packages/build/
192+
# Uncomment if necessary however generally it will be regenerated when needed
193+
#!**/packages/repositories.config
194+
195+
# Windows Azure Build Output
196+
csx/
197+
*.build.csdef
198+
199+
# Windows Store app package directory
200+
AppPackages/
201+
202+
# Visual Studio cache files
203+
# files ending in .cache can be ignored
204+
*.[Cc]ache
205+
# but keep track of directories ending in .cache
206+
!*.[Cc]ache/
207+
208+
# Others
209+
ClientBin/
210+
[Ss]tyle[Cc]op.*
211+
~$*
212+
*~
213+
*.dbmdl
214+
*.dbproj.schemaview
215+
*.pfx
216+
*.publishsettings
217+
node_modules/
218+
bower_components/
219+
220+
# RIA/Silverlight projects
221+
Generated_Code/
222+
223+
# Backup & report files from converting an old project file
224+
# to a newer Visual Studio version. Backup files are not needed,
225+
# because we have git ;-)
226+
_UpgradeReport_Files/
227+
Backup*/
228+
UpgradeLog*.XML
229+
UpgradeLog*.htm
230+
231+
# SQL Server files
232+
*.mdf
233+
*.ldf
234+
235+
# Business Intelligence projects
236+
*.rdl.data
237+
*.bim.layout
238+
*.bim_*.settings
239+
240+
# Microsoft Fakes
241+
FakesAssemblies/
242+
243+
# Node.js Tools for Visual Studio
244+
.ntvs_analysis.dat
245+
246+
# Visual Studio 6 build log
247+
*.plg
248+
249+
# Visual Studio 6 workspace options file
250+
*.opt
251+
252+
# VS auto-generated solution files for project.json solutions
253+
*.xproj
254+
*.xproj.user
255+
*.suo

LICENSE

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
PSSwagger
2+
3+
Copyright (c) Microsoft Corporation
4+
5+
All rights reserved.
6+
7+
The MIT License (MIT)
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
$null = [reflection.assembly]::LoadFrom("$PSScriptRoot\Net45\Microsoft.Rest.ClientRuntime.dll")
22
$null = [reflection.assembly]::LoadFrom("$PSScriptRoot\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll")
3-
#[reflection.assembly]::LoadFrom("$PSScriptRoot\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll")
43
$null = [reflection.assembly]::LoadFrom("$PSScriptRoot\net45\Newtonsoft.Json.dll")
54
$null = [reflection.assembly]::LoadFrom("$PSScriptRoot\net45\Microsoft.Rest.ClientRuntime.Azure.dll")

PSSwagger/PSSwagger.psd1

-6.71 KB
Binary file not shown.

0 commit comments

Comments
 (0)