Я изменил свой файл:
--- a/lib/Mojolicious/Plugin/OpenAPI3.pm
+++ b/lib/Mojolicious/Plugin/OpenAPI3.pm
@@ -396,6 +396,7 @@ sub _check_response {
# Here we do not know what to do with all of this.
# Thus we just say: Not Implemented
# $c->stash->{ status } //= 404;
+ DB::x;
$c->render( status => 501, data => '' );
}
При попытке применить тайник я получаю сообщение об ошибке:
error: Your local changes to the following files would be overwritten by merge:
lib/Mojolicious/Plugin/OpenAPI3.pm
Please commit your changes or stash them before you merge.
Но в stash нет перекрестных изменений одних и тех же строк:
$ git stash show -p
--- a/lib/Mojolicious/Plugin/OpenAPI3.pm
+++ b/lib/Mojolicious/Plugin/OpenAPI3.pm
@@ -452,6 +463,7 @@ sub validate_response {
# NOTICE: Depending on status we will check normal or error response
my $status = $stash->{ status } //= 200;
my $schema = $stash->{ 'openapi3.schema' }{ responses };
+ $status = 'default' if !$schema->{ $status };
# TODO: Schema also not found for not found request:
# Request which come to not defined path. In this case we should provide
# something like default response, should not?
Почему я получаю ошибку выше? Почему изменения в тайнике просто сливаются в рабочий каталог?