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

Refactor Checks to Operate on the Context Object #714

Closed
25 tasks done
maxim-tschumak opened this issue May 23, 2018 · 3 comments
Closed
25 tasks done

Refactor Checks to Operate on the Context Object #714

maxim-tschumak opened this issue May 23, 2018 · 3 comments
Assignees
Labels
area: server Zally server issues

Comments

@maxim-tschumak
Copy link
Contributor

maxim-tschumak commented May 23, 2018

After implementing the initial support for OpenAPI3 we have to adjust the check implementations. Instead of operating on the Swagger object, the checks have to use the Context object. Doing this, the checks become universal - applicable against Swagger2 and OpenAPI3 specifications.

Acceptance Criteria:

  1. The following checks are refactored to use the Context object
  2. Minimal specifications are used in the tests

List of Rules to be refactored

Zalando (API Guidelines)

Done

  • JsonProblemAsDefaultResponseRule
  • UseSpecificHttpStatusCodes
  • AvoidTrailingSlashesRule
  • CommonFieldTypesRule
  • EverySecondPathLevelParameterRule
  • MediaTypesRule 🎋 Branch 🔍 Pull Request
  • AvoidLinkHeadersRule 🎋 Branch 🔍 Pull Request
  • PluralizeResourceNamesRule

High priority list (please migrate these first)

  • FormatForNumbersRule
  • LimitNumberOfResourcesRule (PR)
  • PluralizeNamesForArraysRule (PR)
  • QueryParameterCollectionFormatRule (PR)
  • SecureWithOAuth2Rule (PR)
  • SuccessResponseAsJsonObjectRule (PR)
  • ExtensibleEnumRule (PR)

Lower priority list

  • Use429HeaderForRateLimitRule (PR)
  • SnakeCaseInPropNameRule (PR)
  • SnakeCaseForQueryParamsRule (PR)
  • ApiMetainformationRule (PR)
  • PascalCaseHttpHeadersRule (PR)
  • LimitNumberOfSubresourcesRule (PR)
  • VersionInInfoSectionRule (PR)
  • NestedPathsMayBeRootPathsRule (PR)
  • NoVersionInUriRule (PR)
  • KebabCaseInPathSegmentsRule (PR)

Nic-to-have, less important checks will be refactored as part of #834

@maxim-tschumak maxim-tschumak added the area: server Zally server issues label May 23, 2018
@ghost ghost self-assigned this Jun 27, 2018
@ghost
Copy link

ghost commented Jun 27, 2018

Started

on branch 714-use-context-object.

ghost pushed a commit that referenced this issue Jun 27, 2018
ghost pushed a commit that referenced this issue Jun 27, 2018
ghost pushed a commit that referenced this issue Jun 28, 2018
ghost pushed a commit that referenced this issue Jun 28, 2018
ghost pushed a commit that referenced this issue Jun 28, 2018
ghost pushed a commit that referenced this issue Jun 29, 2018
ghost pushed a commit that referenced this issue Jun 29, 2018
ghost pushed a commit that referenced this issue Jun 29, 2018
ghost pushed a commit that referenced this issue Jun 29, 2018
ghost pushed a commit that referenced this issue Jun 29, 2018
ghost pushed a commit that referenced this issue Jul 2, 2018
ghost pushed a commit that referenced this issue Jul 2, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
ghost pushed a commit that referenced this issue Jul 5, 2018
@ghost
Copy link

ghost commented Jul 5, 2018

NoUnusedDefinitionsCheck

I wanted to create a PR for a 2nd rule today, but that did not happen.

I am stuck with one case that fails and need to figure it out.

The branch in GIT is: 714-rules-to-oas--NoUnusedDefinitionsRule

Next steps

@roxspring
Copy link
Collaborator

Intrigued to notice "SecureAllEndpointsWithScopesRule (currently not used in production)"... is there an issue raised with known problems for this rule?

Seems a shame that the two Zally installations I know of (yours and mine) currently both disable this rule!

maxim-tschumak added a commit that referenced this issue Sep 5, 2018
maxim-tschumak added a commit that referenced this issue Sep 6, 2018
maxim-tschumak added a commit that referenced this issue Sep 7, 2018
maxim-tschumak added a commit that referenced this issue Sep 7, 2018
maxim-tschumak added a commit that referenced this issue Sep 10, 2018
maxim-tschumak added a commit that referenced this issue Sep 10, 2018
roxspring added a commit to roxspring/zally that referenced this issue Oct 18, 2018
roxspring added a commit to roxspring/zally that referenced this issue Oct 18, 2018
roxspring added a commit to roxspring/zally that referenced this issue Oct 18, 2018
ghost pushed a commit to roxspring/zally that referenced this issue Oct 18, 2018
tkrop added a commit to roxspring/zally that referenced this issue Oct 18, 2018
tkrop added a commit to roxspring/zally that referenced this issue Oct 18, 2018
tkrop added a commit to roxspring/zally that referenced this issue Oct 18, 2018
ghost pushed a commit that referenced this issue Oct 26, 2018
…itions-via-json

feat(server): NoUnusedDefinitionsRule reimplemented checks JsonNode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: server Zally server issues
Projects
None yet
Development

No branches or pull requests

2 participants