Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
496de14
Main files of nancyfx generator.
mstefaniuk May 16, 2016
4145f2d
Introducing service interface and some validation.
mstefaniuk May 16, 2016
37e76f4
Main files of nancyfx generator.
mstefaniuk May 16, 2016
874509a
Introducing service interface and some validation.
mstefaniuk May 16, 2016
12fc133
NancyFX generation script.
mstefaniuk May 16, 2016
8fc25d9
Merge remote-tracking branch 'origin/nancyfx-codegen' into nancyfx-co…
mstefaniuk May 16, 2016
3a2cbd8
Added nuget packages, handling empty return types and fixes.
mstefaniuk May 17, 2016
e30e1d9
RequestExceptions utility class template for NancyFx
May 17, 2016
34a8374
Merge branch 'nancyfx-codegen' of https://github.com/FinderSystems/sw…
May 17, 2016
1a67039
Respecting packageName option.
mstefaniuk May 17, 2016
123a441
NancyFX:
May 18, 2016
806e22d
NancyFx: Template for immutable model classes with builders
jakubmalek May 18, 2016
cdb9ab8
Fix of model template.
mstefaniuk May 18, 2016
6564df7
NancyFx: With() method added for model classes
May 18, 2016
dba662d
Code formatting.
mstefaniuk May 18, 2016
f5f5a35
Fix of model builder validation method.
mstefaniuk May 19, 2016
be44df4
Fix of model builder validation method.
mstefaniuk May 19, 2016
8f2523c
Generation of enum types for parameters and properties.
mstefaniuk May 19, 2016
e7781d0
Handling enum properties and nullability.
mstefaniuk May 19, 2016
0005faf
Handling collections of enumerables.
mstefaniuk May 20, 2016
eaddc18
Switching from custom exception to System.ArgumentException.
mstefaniuk May 20, 2016
f4c3b9e
Fixed operation parameter input enums generation.
mstefaniuk May 20, 2016
e17b021
Fix reference to subtemplate.
mstefaniuk May 20, 2016
36e94f7
Enumerations on api input.
mstefaniuk May 23, 2016
9354fc8
Retrieving enum params from api request.
mstefaniuk May 23, 2016
04af1cf
NancyFx:
jakubmalek May 23, 2016
57aa6d0
NancyFx:
jakubmalek May 24, 2016
c653aee
NancyFX:
May 24, 2016
ba38a3b
NancyFx:
May 24, 2016
4b2e3a0
Renaming request dispatcher to Nancy specific Module.
mstefaniuk May 24, 2016
d0e3b5c
Moving enum definition of model lists outside class.
mstefaniuk May 24, 2016
cef6c9d
NancyFx:
May 24, 2016
da3aa72
NancyFx:
May 24, 2016
bc6fcbd
NancyFx:
May 24, 2016
bf68801
NancyFx:
jakubmalek May 24, 2016
c59f2b0
Versioning of generated model (namespace, base context).
mstefaniuk May 25, 2016
a72640c
NancyFx:
jakubmalek May 30, 2016
1d167b7
NancyFx:
jakubmalek May 30, 2016
ba26df9
NancyFx:
jakubmalek May 30, 2016
c734a21
NancyFx:
jakubmalek May 30, 2016
c6d4df3
NancyFx:
jakubmalek May 30, 2016
16200ae
NancyFx:
jakubmalek May 30, 2016
849aa50
NancyFx:
May 31, 2016
30b7eb7
NancyFx:
jakubmalek May 31, 2016
e1df89c
Formatting fix.
mstefaniuk May 31, 2016
fc9b450
NancyFx:
jakubmalek Jun 1, 2016
dbc6c2f
Merge branch 'nancyfx-codegen' of https://github.com/FinderSystems/sw…
Jun 1, 2016
1cfb3d1
NancyFx:
jakubmalek Jun 2, 2016
da5804d
NancyFx:
Jun 2, 2016
0996f8c
NancyFx:
jakubmalek Jun 2, 2016
d201d63
NancyFx:
Jun 2, 2016
4c69e02
NancyFx:
jakubmalek Jun 2, 2016
d1cf803
NancyFx:
Jun 2, 2016
a458e53
NancyFx
Jun 2, 2016
adb02a0
NancyFx:
Jun 2, 2016
9c8373a
NancyFx:
jakubmalek Jun 2, 2016
460f813
NancyFx:
jakubmalek Jun 2, 2016
01145be
NancyFx:
jakubmalek Jun 2, 2016
e52f991
Adding NodaTime types as primitives to keep them nullable.
mstefaniuk Jun 9, 2016
e823c12
Rename inheritance property.
mstefaniuk Jun 9, 2016
b604b1b
NancyFx:
jakubmalek Jun 9, 2016
33149c3
NancyFx:
Jun 9, 2016
38298c3
NancyFx:
jakubmalek Jun 17, 2016
82d290e
Merge with upstream
jakubmalek Jun 17, 2016
6404d47
NancyFx:
jakubmalek Jun 17, 2016
0d9a490
Petstore sample for NancyFX.
mstefaniuk Jun 20, 2016
897cd5c
Updated readme section with enlisted companies using Swagger Codegen.
mstefaniuk Jun 20, 2016
5b7ed41
Extended list of generators.
mstefaniuk Jun 20, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ JavaJerseyServerCodegen.java
JavaResteasyServerCodegen.java
JavascriptClientCodegen.java
NodeJSServerCodegen.java
NancyFXServerCodegen
ObjcClientCodegen.java
PerlClientCodegen.java
PhpClientCodegen.java
Expand Down Expand Up @@ -711,6 +712,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
- [eureka](http://eure.jp/)
- [everystory.us](http://everystory.us)
- [Expected Behavior](http://www.expectedbehavior.com/)
- [Finder](http://en.finder.pl/)
- [FH Münster - University of Applied Sciences](http://www.fh-muenster.de)
- [GraphHopper](https://graphhopper.com/)
- [IMS Health](http://www.imshealth.com/en/solution-areas/technology-and-applications)
Expand Down Expand Up @@ -776,6 +778,7 @@ Swaagger Codegen core team members are contributors who have been making signfic
| Java Spring Boot | |
| Java SpringMVC | @kolyjjj (2016/05/01) |
| Java JAX-RS | |
| NancyFX | |
| NodeJS | @kolyjjj (2016/05/01) |
| PHP Lumen | @abcsum (2016/05/01) |
| PHP Silex | |
Expand Down
10 changes: 10 additions & 0 deletions bin/windows/nancyfx-petstore-server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar

If Not Exist %executable% (
mvn clean package
)

set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate -t modules\swagger-codegen\src\main\resources\nancyfx -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l nancyfx -o samples\server\petstore\nancyfx\

java %JAVA_OPTS% -jar %executable% %ags%
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.Objects;

import io.swagger.models.ExternalDocs;

Expand All @@ -29,14 +30,15 @@ public class CodegenModel {
public List<CodegenProperty> readOnlyVars = new ArrayList<CodegenProperty>(); // a list of read-only properties
public List<CodegenProperty> readWriteVars = new ArrayList<CodegenProperty>(); // a list of properties for read, write
public List<CodegenProperty> allVars;
public List<CodegenProperty> parentVars = new ArrayList<>();
public Map<String, Object> allowableValues;

// Sorted sets of required parameters.
public Set<String> mandatory = new TreeSet<String>();
public Set<String> allMandatory;

public Set<String> imports = new TreeSet<String>();
public Boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasRequired, isArrayModel;
public Boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasRequired, isArrayModel, hasChildren;
public ExternalDocs externalDocs;

public Map<String, Object> vendorExtensions;
Expand Down Expand Up @@ -121,6 +123,10 @@ public boolean equals(Object o) {
return false;
if (externalDocs != null ? !externalDocs.equals(that.externalDocs) : that.externalDocs != null)
return false;
if (!Objects.equals(hasChildren, that.hasChildren))
return false;
if (!Objects.equals(parentVars, that.parentVars))
return false;
return vendorExtensions != null ? vendorExtensions.equals(that.vendorExtensions) : that.vendorExtensions == null;

}
Expand Down Expand Up @@ -157,6 +163,8 @@ public int hashCode() {
result = 31 * result + (isEnum != null ? isEnum.hashCode() : 0);
result = 31 * result + (externalDocs != null ? externalDocs.hashCode() : 0);
result = 31 * result + (vendorExtensions != null ? vendorExtensions.hashCode() : 0);
result = 31 * result + Objects.hash(hasChildren);
result = 31 * result + Objects.hash(parentVars);
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import java.util.List;
import java.util.Map;
import java.util.Objects;

public class CodegenProperty {
public class CodegenProperty implements Cloneable {
public String baseName, complexType, getter, setter, description, datatype, datatypeWithEnum,
name, min, max, defaultValue, defaultValueWithParam, baseType, containerType;

Expand Down Expand Up @@ -43,6 +44,7 @@ public class CodegenProperty {
public CodegenProperty items;
public Map<String, Object> vendorExtensions;
public Boolean hasValidation; // true if pattern, maximum, etc are set (only used in the mustache template)
public Boolean isInherited;

@Override
public String toString() {
Expand Down Expand Up @@ -105,6 +107,7 @@ public int hashCode()
result = prime * result + ((isDateTime == null) ? 0 : isDateTime.hashCode());
result = prime * result + ((isMapContainer == null) ? 0 : isMapContainer.hashCode());
result = prime * result + ((isListContainer == null) ? 0 : isListContainer.hashCode());
result = prime * result + Objects.hashCode(isInherited);
return result;
}

Expand Down Expand Up @@ -256,6 +259,18 @@ public boolean equals(Object obj) {
if (this.isMapContainer != other.isMapContainer && (this.isMapContainer == null || !this.isMapContainer.equals(other.isMapContainer))) {
return false;
}
if (!Objects.equals(this.isInherited, other.isInherited)) {
return false;
}
return true;
}

@Override
public CodegenProperty clone() {
try {
return (CodegenProperty) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(e);
}
}
}
Loading