Updated loading of stubs from .yml files. An 'id' field should now ALWAYS be set, whereas it was automatically generated beforehand if it was not set (which caused some non stub files to get parsed as stub with weird behavior) (https://github.com/dukeofharen/httplaceholder/pull/284).
Added configuration value for "allowGlobalFileSearch" which enables or disables whether users can use the "file response writer" to look for files in the whole OS or only for files relative to the stub .yml files or the file storage location (https://github.com/dukeofharen/httplaceholder/pull/292).
Stubs defined in a .yml file should ALWAYS have an id field defined, whereas it was automatically generated beforehand if it was not set (which caused some non stub files to get parsed as stub with weird behavior).
At first, you could, by default, use the "file response writer" to specify a file anywhere on the OS. Right now, by default, HttPlaceholder will only look relative to the stub .yml files and the file storage location. This configuration value is set to "false" by default for all versions of HttPlaceholder, except for the Docker container.
Not really, besides the fact that the versioning is back at what it was before. I made the stupid decision in November 2021 to change the versioning from date (so 2021.11.11.123) to semver (so 220.127.116.11). This worked up to a certain point, but the .NET tool installation went wrong because a "newer" version was found every time, which meant you needed to de-install the old version and install the new version.
From this point on, the date format is used again for versioning and I try to make as few breaking changes as possible. Sometimes, I have no choice and have to enable a specific feature by default (which was off or non existent before), but try to make it as configurable as possible.
By default, this job is enabled. This means that the old requests will be cleaned once in every 5 minutes. When this job is enabled, the cleaning of requests does not occur anymore after any stub request.
This job can, however, be turned off. Configuration parameter cleanOldRequestsInBackgroundJob has been added for this purpose.
This configuration parameter has been added because some people host HttPlaceholder in a cloud environment with a serverless database. Performing a query every 5 minutes can crank up the costs. By cleaning the requests in the old way, no more SQL queries than necessary will be performed so the costs stay (relatively) low.
Besides this, whenever a request could not be matched to a stub and the user interface is disable, an empty response will be returned instead of a basic HTML page.
As mentioned before, the "clean old requests" job is now enabled by default. If you want HttPlaceholder to continue cleaning requests in the old way, set cleanOldRequestsInBackgroundJob to false to not get a bigger bill on your serverless database than needed.
Like described above, it is now not possible anymore to define more than 1 response writer. Before this, it would be useless to do this anyway because only 1 response body writer can be used, but it is now not possible anymore.
Use Roboto Mono as font for user interface.
Fixed bug in tenant filtering of requests and stubs screen.
When a single stub has been generated and will be opened in the stub form, place it in the stub form as a single stub.
Added separate stub form helpers for JSON, XML, HTML, plain text and Base64.
Added CodeMirror editor input for response body helpers.
When updating the response body using one of the response body helpers, immediately insert the body in the stub.
Added placeholder text when there are no requests or stubs.
Disable mutation buttons on stubs screen when no stubs are currently visible.
Animate on routing.
Renamed a few variable handlers to more logical names.
Fixed spacing bug with sidebar and main content. The content now does not go outside of the main content anymore.
When URL in request is too long, break it up instead of letting it go outside of the current view.
Many changes to make the UI more mobile friendly (fixed the sidebar, fixed the stub form etc.)
Added possibility to manage scenarios through the user interface.
Since HttPlaceholder is now using .NET 6, you also need to install .NET 6 SDK on your PC if you use the .NET tool version. If you use the OS specific version of HttPlaceholder, you do not have to have the .NET SDK installed.
Added completely new .NET client for HttPlaceholder API.
Don't log warnings which aren't actually warnings.
Added "json" (not JSONPath) condition checker.
Added integration tests with Postman.
Added stub validation for stubs added as .yaml files or through API.
Implemented several performance improvements.
If a condition checker fails for a stub, do not execute the other condition checkers.
Order condition checkers by priority. The quickest condition checkers are executed before the more complex ones.
Added caching mechanism for use together with a relational database (MySQL, SQLite or MS SQL Server). The caching is implemented in such a way that whenever you run multiple instances of HttPlaceholder and you update stubs on one instance, the cache on the other instaces will also be invalidated so you don't have stale caches in the other instances.
Fixed multiple issues in UI.
Fixed bug in generating stub based on request in BasicAuthenticationHandler.
Made it possible to run HttPlaceholder on multiple HTTP(S) ports.
Upgraded NuGet packages.
Fixed "feature" where stub with old ID was deleted when the ID of the stub was changed.
Added response writer for creating stub images.
Added response writer for content type.
Updated Docker image so it has a default value for "inputFile"
Added possibility for disabling stub.
Added some text that will be shown when HTTP 501 is returned if no stub was found.
Fixed the previous bugged release. For some reason, the build succeeded, but the dotnet publish command resulted in an error. I've added additional error handling and fixed the actual build, so it (hopefully) never happens again.
Removed negative conditions from HttPlaceholder. They are not refined enough.
The search functionality in the UI is now case insensitive.
Return 501 (Not Implemented) instead of 500 (Internal Server Error) if no stub was configured for the request.
Added lazy loading for requests and stubs in the user interface.
Updated to .NET 5 and upgraded all NuGet packages.
Added reverse proxy response writer.
REST API now returns JSON responses by default instead of YAML.
Added a complete form to the UI for adding stubs.
Fixed issue with IIS hosting.
Project upgrade to .NET Core 3.1.
Upgrade and several bug fixes of user interface.
Fixed login issues for UI.
Make all config settings case insensitive.
Allow command line arguments without values (e.g. you can now do "httplaceholder --usehttps" instead of "httplaceholder --usehttps true")
Fixed issue where PowerShell would append double quotes to "inputFile" property when starting HttPlaceholder.
Added SSL private key installation scripts for Windows, Linux and Mac.
Also allow YAML stub files which are not in the form of an array.
Complete rewrite of UI to material design.
Added stub examples to UI to insert when adding new stub.
Upgrade to ASP.NET Core 3.0
If a collection is not set in a REST API post or put call, don't return the AutoMapper default of the collection (empty collection instead of null) after performing a GET.
Added a possibility for disabling the user interface.
Added some documentation about reverse proxies and fixed the displayed hostname in UI after a request through a reverse proxy is made to Httplaceholder.
It is possible to configure the application using environment variables now.
Made it possible to see stubs and requests made for a specific tenant / category.
Made it possible to download all stubs within a specific tenant / category.
Did a SonarQube analysis and fixed some issues.
Added stub generation based on request.
Refactored build procedure.
Added "pretty print" for posted form values.
Several bug fixes.
Added response variable parsers for local and UTC date & time.
Added update stub and delete all stubs call.
Complete restructure of .NET application.
Added SignalR to automatically refresh GUI if there are new requests.