Skip to content

Conversation

@RGO230
Copy link
Contributor

@RGO230 RGO230 commented Jul 2, 2025

@RGO230 RGO230 self-assigned this Jul 2, 2025
@RGO230 RGO230 assigned AZabolotnikov and RGO230 and unassigned RGO230 and AZabolotnikov Jul 3, 2025
@RGO230 RGO230 assigned AZabolotnikov and unassigned RGO230 Jul 9, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 9, 2025

@AZabolotnikov AZabolotnikov assigned DenTray and RGO230 and unassigned AZabolotnikov Jul 31, 2025
@DenTray DenTray removed their assignment Aug 12, 2025
@astorozhevsky astorozhevsky requested a review from Copilot August 28, 2025 09:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the error response page formatting for Swagger validation errors, addressing issue #163. The changes enhance error presentation with structured markdown formatting and proper error context display.

  • Reformats error page display with markdown structure including headers and visual separators
  • Updates error handling to include exception type information alongside error messages
  • Fixes test parameter ordering and adds new test case for incorrect documentation structure

Reviewed Changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/views/error.blade.php Updates error page template with structured markdown formatting
src/Services/SwaggerService.php Modifies exception handling to capture and pass exception type information
tests/SwaggerServiceTest.php Updates test expectations and adds new test case for documentation structure errors
tests/TestCase.php Fixes parameter order in exportContent method call
tests/fixtures/SwaggerServiceTest/*.html Updates all error fixture files to match new markdown-formatted error template

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@RGO230 RGO230 assigned AZabolotnikov and unassigned RGO230 Sep 1, 2025
@AZabolotnikov AZabolotnikov assigned RGO230 and unassigned AZabolotnikov Sep 4, 2025
@DenTray DenTray requested a review from Copilot November 6, 2025 07:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 62 out of 64 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DenTray
Copy link
Collaborator

DenTray commented Nov 6, 2025

@RGO230 please review copilot's comments and increase test coverage

@DenTray DenTray assigned RGO230 and unassigned AZabolotnikov Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@RGO230 RGO230 assigned AZabolotnikov and unassigned RGO230 Nov 6, 2025
@DenTray DenTray requested a review from Copilot November 11, 2025 03:34
Copilot finished reviewing on behalf of DenTray November 11, 2025 03:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 62 out of 64 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DenTray DenTray requested a review from Copilot November 11, 2025 04:50
Copilot finished reviewing on behalf of DenTray November 11, 2025 04:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 62 out of 64 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


public function testGetInvalidJsonDocumentation(): void
{
$this->disk->put(self::$productionFilePath, $this->getFixturePath('invalid_prod_json_data'));
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using getFixturePath() incorrectly - this returns a file path string, not file content. Should use $this->getFixture('invalid_prod_json_data.json') to write the actual fixture content to the storage disk.

Suggested change
$this->disk->put(self::$productionFilePath, $this->getFixturePath('invalid_prod_json_data'));
$this->disk->put(self::$productionFilePath, $this->getFixture('invalid_prod_json_data.json'));

Copilot uses AI. Check for mistakes.

protected function assertExceptionHTMLEqualsFixture(string $fixture, string $content, bool $exportMode = false): void
{
$content = Str::replaceMatches('/line=\d+,/', 'line=999, ', $content);
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern /line=\d+,/ matches 'line=123,' but the replacement is 'line=999, ' (with an extra space after the comma). This creates inconsistent spacing. The replacement should be 'line=999,' to maintain consistent formatting.

Copilot uses AI. Check for mistakes.
Comment on lines +250 to +252
$prodDocPath = "tests/fixtures/SwaggerServiceTest/{$prodDoc}.json";

file_put_contents($productionFilePath, file_get_contents($prodDocPath));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it works the same?

Suggested change
$prodDocPath = "tests/fixtures/SwaggerServiceTest/{$prodDoc}.json";
file_put_contents($productionFilePath, file_get_contents($prodDocPath));
$documentation = $this->getJsonFixture($prodDoc);
file_put_contents($productionFilePath, $documentation);


$fileContent = json_decode(file_get_contents($filePath), true);

if (empty($fileContent)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you remove it? The additional documentation may not be exists by the path set in the config and it good to throw an error in this case


public function testGetInvalidJsonDocumentation(): void
{
file_put_contents(self::$productionFilePath, $this->getFixturePath('invalid_prod_json_data'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file_put_contents(self::$productionFilePath, $this->getFixturePath('invalid_prod_json_data'));
file_put_contents(self::$productionFilePath, $this->getFixture('invalid_prod_json_data'));

@DenTray DenTray assigned RGO230 and unassigned DenTray Nov 11, 2025
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.

4 participants