-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added credential inputs, cleaned up the code, and added ui to edit ba…
…se class
ewelsh
committed
Jul 18, 2017
1 parent
8e83354
commit ebc977b
Showing
15 changed files
with
322 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EpicorSwaggerRESTGenerator.Models | ||
{ | ||
public static class Client | ||
{ | ||
public static WebClient getWebClient(string username = "", string password = "") | ||
{ | ||
WebClient client = new WebClient(); | ||
ServicePointManager.ServerCertificateValidationCallback += (senderC, cert, chain, sslPolicyErrors) => true; | ||
if (!string.IsNullOrEmpty(username)) | ||
{ | ||
client.Credentials = new NetworkCredential() { UserName = username, Password = password }; | ||
}else | ||
{ | ||
client.UseDefaultCredentials = true; | ||
} | ||
return client; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EpicorSwaggerRESTGenerator.Models | ||
{ | ||
public class EpicorDetails | ||
{ | ||
public string Namespace { get; set; } | ||
public bool useBaseClass { get; set; } | ||
public string BaseClass { get; set; } | ||
public string APIURL { get; set; } | ||
public string Project { get; set; } | ||
public string Username { get; set; } | ||
public string Password { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using EpicorSwaggerRESTGenerator.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EpicorSwaggerRESTGenerator.Models | ||
{ | ||
/// <remarks/> | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2007/app")] | ||
public partial class serviceWorkspace | ||
{ | ||
|
||
private title titleField; | ||
|
||
private serviceWorkspaceCollection[] collectionField; | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://www.w3.org/2005/Atom")] | ||
public title title | ||
{ | ||
get | ||
{ | ||
return this.titleField; | ||
} | ||
set | ||
{ | ||
this.titleField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlElementAttribute("collection")] | ||
public serviceWorkspaceCollection[] collection | ||
{ | ||
get | ||
{ | ||
return this.collectionField; | ||
} | ||
set | ||
{ | ||
this.collectionField = value; | ||
} | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
EpicorSwaggerRESTGenerator/Models/serviceWorkspaceCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EpicorSwaggerRESTGenerator.Models | ||
{ | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2007/app")] | ||
public partial class serviceWorkspaceCollection | ||
{ | ||
|
||
private title titleField; | ||
|
||
private string[] textField; | ||
|
||
private string hrefField; | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlElementAttribute(Namespace = "http://www.w3.org/2005/Atom")] | ||
public title title | ||
{ | ||
get | ||
{ | ||
return this.titleField; | ||
} | ||
set | ||
{ | ||
this.titleField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlTextAttribute()] | ||
public string[] Text | ||
{ | ||
get | ||
{ | ||
return this.textField; | ||
} | ||
set | ||
{ | ||
this.textField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string href | ||
{ | ||
get | ||
{ | ||
return this.hrefField; | ||
} | ||
set | ||
{ | ||
this.hrefField = value; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EpicorSwaggerRESTGenerator.Models | ||
{ | ||
/// <remarks/> | ||
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2005/Atom")] | ||
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.w3.org/2005/Atom", IsNullable = false)] | ||
public partial class title | ||
{ | ||
|
||
private string typeField; | ||
|
||
private string valueField; | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlAttributeAttribute()] | ||
public string type | ||
{ | ||
get | ||
{ | ||
return this.typeField; | ||
} | ||
set | ||
{ | ||
this.typeField = value; | ||
} | ||
} | ||
|
||
/// <remarks/> | ||
[System.Xml.Serialization.XmlTextAttribute()] | ||
public string Value | ||
{ | ||
get | ||
{ | ||
return this.valueField; | ||
} | ||
set | ||
{ | ||
this.valueField = value; | ||
} | ||
} | ||
} | ||
} |