swagger-api/swagger-editor

View on GitHub

Showing 94 of 206 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const allOAS3OperationSchemas = () => (system) => {
  return system.fn.traverseOnce({
    name: "allOAS3OperationSchemas",
    fn: (node) => {
      if(
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 1 other location - About 2 hrs to fix
src/plugins/validate-semantic/selectors.js on lines 238..250

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const allDefinitions = () => (system) => {
  return system.fn.traverseOnce({
    name: "allDefinitions",
    fn: (node) => {
      if(
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 1 other location - About 2 hrs to fix
src/plugins/validate-semantic/selectors.js on lines 263..275

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 89.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allResponseSchemas = () => (system) => {
  return system.fn.traverseOnce({
    name: "allResponseSchemas",
    fn: (node) => {
      if(system.validateSelectors.isResponseSchema(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allOAS3RequestBodies = () => (system) => {
  return system.fn.traverseOnce({
    name: "allOAS3RequestBodies",
    fn: (node) => {
      if(system.validateSelectors.isOAS3RequestBody(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allTags = () => (system) => {
  return system.fn.traverseOnce({
    name: "allTags",
    fn: (node) => {
      if(system.validateSelectors.isTag(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allParameterSchemas = () => (system) => {
  return system.fn.traverseOnce({
    name: "allParameterSchemas",
    fn: (node) => {
      if(system.validateSelectors.isParameterSchema(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allHeaders = () => (system) => {
  return system.fn.traverseOnce({
    name: "allHeader",
    fn: (node) => {
      if(system.validateSelectors.isHeader(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

function suggestionFromSchema(map) {
  const res = toArray(mapValues(map, (val, key) => {
    const keyword = get(val, "__value", key)
    const meta = isPlainObject(val) ? "object" : "keyword"

src/plugins/editor-autosuggest-keywords/get-keywords-for-path.js on lines 135..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allOAS3RequestBodySchemas = () => (system) => {
  return system.fn.traverseOnce({
    name: "allOAS3RequestBodySchemas",
    fn: (node) => {
      if(
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allParameters = () => (system) => {
  return system.fn.traverseOnce({
    name: "allParameters",
    fn: (node) => {
      if(system.validateSelectors.isParameter(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const all$refs = () => (system) => {
  return system.fn.traverseOnce({
    name: "all$refs",
    fn: (node) => {
      if(system.validateSelectors.isRef(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allResponses = () => (system) => {
  return system.fn.traverseOnce({
    name: "allResponses",
    fn: (node) => {
      if(system.validateSelectors.isResponse(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const allSubSchemas = () => (system) => {
  return system.fn.traverseOnce({
    name: "allSubSchemas",
    fn: (node) => {
      if(system.validateSelectors.isSubSchema(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 227..236
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

function suggestionFromSchema(map) {
  const res = toArray(mapValues(map, (val, key) => {
    const keyword = get(val, "__value", key)
    const meta = isPlainObject(val) ? "object" : "keyword"

src/plugins/editor-autosuggest-oas3-keywords/get-keywords-for-path.js on lines 135..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

export const all$refArtifacts = () => (system) => {
  return system.fn.traverseOnce({
    name: "all$refArtifacts",
    fn: (node) => {
      if(system.validateSelectors.isRefArtifact(node)) {
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 111..120
src/plugins/validate-semantic/selectors.js on lines 162..171
src/plugins/validate-semantic/selectors.js on lines 173..182
src/plugins/validate-semantic/selectors.js on lines 194..203
src/plugins/validate-semantic/selectors.js on lines 205..214
src/plugins/validate-semantic/selectors.js on lines 216..225
src/plugins/validate-semantic/selectors.js on lines 252..261
src/plugins/validate-semantic/selectors.js on lines 277..288
src/plugins/validate-semantic/selectors.js on lines 290..299
src/plugins/validate-semantic/selectors.js on lines 301..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 73.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const isOAS3ResponseSchema = (state, node) => () => {
  const [key,, gpKey,, gggpKey] = node.path.slice().reverse()

  return key === "schema"
    && gpKey === "content"
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 1 other location - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 80..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const tagItem = (updateForm, path) => 
  fromJS({
    tag: {
      value: "",
      isRequired: true, 
src/standalone/topbar-insert/forms/form-objects/add-operation-tags.js on lines 4..14

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

const tagItem = (updateForm, path) => 
  fromJS({ 
    tag: {
      value: "",
      isRequired: true, 
src/standalone/topbar-insert/forms/form-objects/operation-object.js on lines 3..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const isOAS3RequestBodySchema = (state, node) => () => {
  const [key,, gpKey, ggpKey] = node.path.slice().reverse()

  return key === "schema"
    && gpKey === "content"
Severity: Major
Found in src/plugins/validate-semantic/selectors.js and 1 other location - About 1 hr to fix
src/plugins/validate-semantic/selectors.js on lines 88..94

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    version: {
      value: existingValues ? existingValues.get("version") : "", 
      isRequired: true, 
      name: "Version",
      description: "REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).",
src/standalone/topbar-insert/forms/form-objects/info-object.js on lines 7..14

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language