Skip to content

Conversation

@mikolajpe
Copy link
Owner

No description provided.

jaz-ah and others added 30 commits April 6, 2016 15:20
… going to match the enum name - now that we camelCase variable names this cuts down on the amount of enum escaping we have.
Resolving an issue with serializing classes that contain required
properties. When the only constructor has defaulted parameters, no
parameterless constructor is generated but JSON.Net attempts to call
the missing constructor on deserialization (because of DataContract).

See: https://manski.net/2014/10/net-serializers-comparison-chart/

The fix here is to create a protected constructor, annotate it with
JsonConstructorAttribute to inform JSON.Net it is the constructor to use
during serialization, then provide settings that explicitly allow
JSON.Net to access non-public constructors during serialiazation.
In Angular.js, values are injected into service in one of two ways:

1) Inline (by name).
2) By a static injector variable.

The TypeScript generator uses the 2nd method. This method requires you
to explicitly enumerate all the values you would like to have injected.
If you fail to inject a value the Angular DI system will simply pass you
`undefined`. The constructor is expecting 3 values to be passed (the
final being basePath) but the injector static only defines 2 values.
This results in basePath always being undefined no matter what you
define it to be.

This change updates the injector variable to handle that properly.
In Angular if a value is not defined for injection it is passed as
undefined. That means that most of the time `if (value) {` is a
reasonable test. Unfortunately since `""` (empty string) is also falsey
by nature, an empty string will not trigger the if properly.

Instead you should check `if (value !== undefined) {`.
- Moved Logging to separate Logger file
- Moved selectHeaderAccept and selectHeaderContentType to sanitizer
- little optimizations
…equest method for easier override to modify request.
wing328 and others added 28 commits May 21, 2016 16:12
…odegen into jaz-ah-swift/podupdate

Conflicts:
	samples/client/petstore/swift/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj
add gradle wrapper mustache for android api client;
…ould_generate_correct_output

Feature/typescript angular2 should generate correct output
[C#] fix csharp constructor for model with read-only 1st property
[Swift] Add sample/tests for Swift client without PromiseKit
initalise=> initialize
Mispelling in Objective-C initialization
codition => condition
Mispelling in Objective-C initialization template
[PHP] add enum test in PHP API client
typescript-angular2 query string fix
@mikolajpe mikolajpe merged commit e687ad5 into mikolajpe:master May 24, 2016
mikolajpe pushed a commit that referenced this pull request Oct 5, 2016
* Initial erlang generation

* Recfactor erlang codegen to make a minimal working example

* ft/erlang_codegen Separate handlers by resourse, add minor codegen fixes and refactoring

* Test commit

* ft/erlang_codegen Modify reouting generation

* ft/erlang_codegen Remove parsed request concept. Add minor refactoring and bugfixes

* ft/erlang_codegen Use swagger spec from an internal directory instead of a provided path

* ft/erlang_codegen Add basic response validation

* ft/erlang_codegen Moved all the req validators to a separate file for test needs

* ft/erlang_codegen Add basic param validation

* Add refactoring:
OperationIDs are atoms now
Fix schema validation
Add todo list

* CAPI-23 Add auth context to request handling (#2)

* CAPI-23 Fix routing to support different paths in one handler. Add auth context to request handling. Add an opportunity to pass custom middlewares to the server

* CAPI-31 Add enum validation and some minor fixes (#4)

* CAPI-31 Fix turbo fuck up with additional params (#5)

* Capi 23/fix/basic logging (swagger-api#6)

* CAPI-23 Add understandable messages in case of bad requests. Add specs to shut up dialyzer and add some minor code refactoring

* CAPI-23 Fix missed bracket in auth module (swagger-api#7)
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.