* [go] More idiomatic godoc comments
* [go] Mark deprecated fields and functions
* [go] Minor mustache readability/consistency fixes
* [go] Mark deprecated operation parameters
* [go] Deprecate a petstore component property for testing
* [go] Apply deprecated godoc in Go servers also
* Add samples composer.lock to root .gitignore
composer.lock may produce CI errors when you need to test build against
different PHP versions. However users most likely want to commit this
file, so I think it's better to exclude it only in root .gitignore.
* Commit composer.lock in default PHP templates
* Refresh samples
* Remove package from sources
* Add Mocker package
* Add BaseModel
Beside setters and getters this class implements three methods required
for mocking: getOpenApiSchema, createFromData and jsonSerialize.
BaseModel keeps all data values in $dataContainer like PHP client does.
I don't see other way to support scalar models(enum for instance).
That's why I've removed class variables generation.
* Update documentation
* Update PHPUnit section in readme
* Add constant with models namespace
This constant will be required for data deserialization when handling
refs.
* Refresh samples
* Add samples generation config
* Bump required PHP version to 7.2
* Update rest dependencies to meet php 7.2
Latest phpunit 9 requires PHP 7.3, so I've set phpunit 8 as a fallback.
* Fix TestCase inheritance
* Add phpunit cache file to gitignore
* Put license @phpdoc into separate mustache
* Bump readme PHP version to 7.2
* Bump @phpdoc PHP version to 7.2
* Update Zend Diactoros with suggested package
* Refresh samples
* Remove broken tests
These tests will be fixed in next PR which moves Mock feature to
external repo.
* Point root Travis CI environment to PHP 7.3
* Use HttpNotImplementedException from Slim
Specialized HttpNotImplementedException from Slim makes possible to
distinguish general exceptions from case when implementation isn't
complete. This update doesn't change API call results.
* Refresh samples
* [core] Refactor templating management
This refactors template management to get logic out of DefaultGenerator
and to provide a cleaner API to template search and read/compile.
Deprecates MockDefaultGenerator, which is not a mock and causes
in-memory retention of file contents. Maintainers should prefer
executing a "dryRun" with new DefaultGenerator(true) or do true
mock/spies if evaluating template intermediaries is truly necessary.
Tests may read written files with lower overhead than the in-process
retention of those bytes.
This attempts to maintain some compatibility with existing templating
adapter interfaces. Any breaking change here would be unintentional but
minimal effort to retarget the new interface.
* Tests for dry run file outputs
* Update API usage in Meta, test TemplateManager
* Wait on lastModified, lookup by filename in SpringCodegenTest
* Test DefaultGenerator + ignore file
* Move config.processOpenAPI in DefaultGenerator
* Fix wrong use of libraries templateDirector (java)
The samples scripts for Java incorrectly referenced the libraries
directories directly rather than the upper-level Java directory. This
was incorrect usage of template directories, because the generator
expects to be given the "language" directory and perform a lookup for
missing templates in the order:
* user defined libraries directory
* user defined language root
* embedded libraries directory
* embedded language root
* _common directory
This is incorrect in our samples scripts because a user or maintainer
has the expectation that any template change to files at the Java/ root
should also be honored on generation if the script specifies a custom
template directory.
* Fix handlebars extension usage, clean up Meta tasks
HandlebarseEngineAdapter previously didn't handle files without
extensions in the same was as the MustacheEngineAdapter. This now allows
for files without extension (or dotfiles) to lookup in the same
location.
Meta tasks are cleaned up to use template manager only, rather than
attempting to create an "empty" generator to use the previous templating
specific methods.
* Update kotlin-multiplatform gradle wrapper
* Rename GraphQL .gitignore template
The .gitignore file is unable to load via classpath resource from the
graphql node server resource directory (for unknown reasons). Before
this change, the missing template would fail silently.
A .gitignore file may exist in other directories and load as expected.
Added a default .gitignore to _common as a fallback so as not to break
any custom generators which may also be failing silently.
* Log entire stacktrace in go sdk built by gradle in AppVeyor
* Rename PHP .gitignore to gitignore
Java resources may not load .gitignore, this follows suit with other
generators and uses "gitignore" (some use "gitignore.mustache").
* [php] Rename .gitignore templates to gitignore
* Use same classpath lookup in common locator
* [rust] Properly escape empty triple-braces
* [samples] Regenerate
* Try decoding but don't bail on error
* Switch binary and ByteArray to bytes
* Read content type and parse appropriately
* Remove response parsing
* Remove response parsing and just return the data
* Update petshop examples w/ new generator code
* Fix copy/paste error with naming
* Update petstore examples
* Move response decoding to inside _preload_content block
* Update the clients again
* Use a raw string for the regex pattern
* Regenerate petstore clients
* Add bytes to python primitives as it's supported in 2.7 and 3
* Add bytes to the exports from model_utils
* Import bytes from model_utils
* Add conditional typing for regex pattern to match variable type
* Regenerate petstore clients
* Use read() instead of text() for asyncio
* Regenerate petstore clients
* Remove unused six import
* Regenerate petstore clients
* Add newline to kick Circle to re-run
* Remove whitespace from tox.ini
* Update more examples after ensure_updated
* Add sample updates that didn't run with the --batch flag
* Remove extra bracket in regex to remove warning
* Stop printing debug messages
* Add bytes examples to python doc generators
* Update generated FakeApi docs
* Regenerate api_client.py
* Remove print statements from generated clients
* Update bytes example in FakeApi.md. Again. I swear.
* Add yet another seemingly missing doc update
* Catch the error, decode the body, and re-throw
* Remove the updates now that the change is non-breaking
* Regenerate client
* Add bytes deserialization test
* Update exception parsing
* Add exception parsing for python-experimental
* Regenerate client with minor changes
* Revert test changes
* Regenerate model_utils.py
* Update confusing test name
* Remove bytes from mapping and examples
* Add back in the old binary/ByteArray to str mapping
* Update docs and api_client template
* Add experimental api_client changes
* Regenerate samples again
* Add Tornado handling to early return
* Try fixing Tornado python returns
* More documentation changes
* Re-generate the client code
* Remove bytes from test_format_test
* Remove more leftover bytes usages
* Switch bytes validation back to string
* Fix format_test template and regenerate
* Remove unused bytes var
* Remove bytes import from models and regenerate
* Remove bytes import from test_deserialization
* Reduce nested ifs
* Remove byte logic for now
* Regenerate client after latest changes
* Remove another bytes usage
* Regenerate after removing dangling byte string usage
* Reduce the scope of the try/catch in api_client
* Regenerate after try/catch cleanup
* Swap catch for except
* Regenerate Python client after api_client change
* Fix lint error on the generated api_client
* Add binary format test back in w/ string
* Add decoding to python-experimental and regenerate
* Import re into python-experimental api_client
* Ensure file upload json response is utf-8 encoded bytes
* Added hasVars after completion of all model post-processing (#5587)
* Post ensure-up-to-date
* Update to check the size of vars and not assume non-null
* [Slim4] Support byte data format
* [Slim4] Support date and date-time data formats
* [Slim4] Support password data format
* [Slim4] Support uuid data format
* [Slim4] Fix test of password format mocking
'00000' is numeric type, because PHPUnit doesn't make strict type
comparison.
* [Slim4] Fix data format key in object mocking
* [Slim4] Support binary data format
* [Slim4] Support email data format
* [Slim4] Base64 encode binary format output
Raw bytes string breaks PHP stdout output, so I've decided to use base64
encoding format for binary format too.
* [Slim4] Refresh samples
* [Slim4] Add new method to Mocker interface
* [Slim4] Add implementation and tests for new method
* [Slim4] Add test fixture to encrease code coverage
* [Slim4] Add ref support to mockArray method
* [Slim4] Add mockFromRef method
* [Slim4] Add ref support to mockObject method
* [Slim4] Add ModelInterface
* [Slim4] Refresh samples
* [Slim4] Add ref support to mockFromSchema method
* [Slim4] Run all test suites by default test command
As it turnes out to generate coverage report for a whole project I need
to run all test suites at once.
* [Slim4] Fix enum option of string mocking
* [Slim4] Add integration tests
* [Slim4] Remove unnecessary syntax check script
Composer package called "phplint" processes the same syntax check and
even faster. It can use cache when files hasn't been changed.
* [Slim4] Exclude composer.lock from codebase
Travis CI fails, it cannot install dependencies from lock file under
different PHP(7.1.33) version.