Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#45: Add swagger spec validator to validate temp and additional doc format #82

Merged
merged 28 commits into from
Oct 2, 2023

Conversation

vitgrams
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@vitgrams vitgrams force-pushed the 45_fix_exception_when_setting_invalid_additional_path branch from 197d3d5 to da20b81 Compare April 18, 2023 12:04
@vitgrams vitgrams force-pushed the 45_fix_exception_when_setting_invalid_additional_path branch 2 times, most recently from 4f54897 to 9450fad Compare April 18, 2023 16:14
@vitgrams
Copy link
Contributor Author

vitgrams commented Apr 18, 2023

@DenTray
Following cases were handled:
a) a non-json file is provided as additional doc/temp doc file;
b) provided a json file with violations of the basic rules of the Swagger v2.0 specification (missing fields, fields that have invalid values, unique constraint violations, invalid $refs and violations of other specific rules).

Could you please review this code?

@vitgrams vitgrams requested a review from DenTray April 18, 2023 19:30
@vitgrams vitgrams force-pushed the 45_fix_exception_when_setting_invalid_additional_path branch from 0749b85 to b057d01 Compare April 19, 2023 12:50
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 45 Code Smells

No Coverage information No Coverage information
1.4% 1.4% Duplication

config/auto-doc.php Outdated Show resolved Hide resolved
src/Exceptions/SpecValidation/DuplicateFieldException.php Outdated Show resolved Hide resolved
src/Services/SwaggerService.php Outdated Show resolved Hide resolved
src/Services/SwaggerService.php Outdated Show resolved Hide resolved
src/Services/SwaggerService.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@DenTray DenTray assigned vitgrams and unassigned DenTray May 9, 2023
@Goodmain Goodmain assigned Goodmain and unassigned vitgrams Sep 24, 2023
deepsource-autofix bot and others added 3 commits September 24, 2023 21:57
This commit fixes the style issues introduced in 1699855 according to the output
from PHP CS Fixer.

Details: #82
…tional_path

# Conflicts:
#	tests/SwaggerServiceTest.php
…valid_additional_path' into 45_fix_exception_when_setting_invalid_additional_path
@Goodmain Goodmain requested a review from DenTray September 25, 2023 23:13
@Goodmain Goodmain assigned DenTray and unassigned Goodmain Sep 25, 2023
config/auto-doc.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Show resolved Hide resolved
src/Services/SwaggerService.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
@DenTray DenTray assigned Goodmain and unassigned DenTray Sep 26, 2023
@Goodmain Goodmain self-requested a review September 27, 2023 16:52
@Goodmain Goodmain assigned DenTray and unassigned Goodmain Sep 27, 2023
src/Validators/SwaggerSpecValidator.php Outdated Show resolved Hide resolved
@DenTray DenTray assigned Goodmain and unassigned DenTray Sep 28, 2023
@Goodmain Goodmain requested a review from DenTray September 28, 2023 22:22
@Goodmain Goodmain assigned DenTray and unassigned Goodmain Sep 28, 2023
tests/SwaggerServiceTest.php Outdated Show resolved Hide resolved
tests/SwaggerServiceTest.php Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@DenTray DenTray merged commit f45a57d into master Oct 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants