Repository: Redocly/redocly-cli (ts)

Issue:
Mismatch between rules ids in docs and in-code
**Describe the bug**

https://redocly.com/docs/cli/rules/no-server-example-com/
https://redocly.com/docs/cli/rules/no-empty-enum-servers/

In these two doc pages the rule id documented is different to what is actually used in code. 
When using  `no-server-example-com`, in-code the id is `no-server-example.com`
When using `no-empty-enum-servers` in-code the id is `no-servers-empty-enum`

Because of this, when using the documented rule ids, and running `redocly lint`, the output will throw the `<Property> not expected here` warning.
Also, these rules are not validated given that the rule id was not found.

**To Reproduce**
Steps to reproduce the behavior:
1. Given this `redocly.yaml` file:
```---
styleguide:
  extends:
    - recommended
  rules:
    no-empty-enum-servers: error
    no-server-example-com: error
```
3. And any OpenAPI file
4. Run this command with these arguments... `redocly lint`
5. See error

**Expected behavior**
Either documentation gets updated to use the correct in-code rule ids, or in-code rule ids get updated to match documentation

**Logs**
```
[1] redocly.yaml:8:5 at #/styleguide/rules/no-empty-enum-servers

Property `no-empty-enum-servers` is not expected here.

 6 |   - recommended
 7 | rules:
 8 |   no-empty-enum-servers: error
 9 |   no-server-example-com: error
10 |

Warning was generated by the configuration spec rule.


[2] redocly.yaml:9:5 at #/styleguide/rules/no-server-example-com

Property `no-server-example-com` is not expected here.

 7 | rules:
 8 |   no-empty-enum-servers: error
 9 |   no-server-example-com: error
10 |

Warning was generated by the configuration spec rule.


You have 2 warnings.
validating /test.json...
/test.json: validated in 19ms

Woohoo! Your OpenAPI definition is valid. 🎉
```

**OpenAPI definition**

OpenAPI definition: any
redocly.yaml file:
```
---
apis:
  test:
    root: ./test.json
styleguide:
  extends:
    - recommended
  rules:
    no-empty-enum-servers: error
    no-server-example-com: error
```

**Redocly Version(s)**
1.0.0-beta.106

**`Node.js` Version(s)**
v18.2.0

**Additional context**
N/A


Pull request:
fix: rename rule no-empty-enum-servers to no-server-variables-empty-enum
## What/Why/How?

- rename `no-empty-enum-servers` to `no-server-variables-empty-enum` and adjust corresponding code and docs. The current live docs are completely incorrect and wouldn't function, so it is safer to rename (the actual working one would have been `no-servers-empty-enum` but it wasn't documented that way due to the strange naming in the source code: https://redocly.com/docs/cli/rules/no-empty-enum-servers/ -- the changelog should note the rename.
- docs: fix `no-server-example.com` docs

## Reference

- Fixes #812 

## Testing

Passed.

## Check yourself

- [x] Code is linted
- [ ] **N/A** Tested with redoc/reference-docs/workflows
- [x] All new/updated code is covered with tests

## Security

- [x] Security impact of change has been considered
- [x] Code follows company security practices and guidelines


Patch:
diff --git a/docs/rules.md b/docs/rules.md
index b6e7dc2c..28fd115f 100644
--- a/docs/rules.md
+++ b/docs/rules.md
@@ -75,7 +75,7 @@ The *Special rules* group contains rules that may apply to multiple objects or t
 - [no-empty-servers](./rules/no-empty-servers.md)
 - [no-server-example.com](./rules/no-server-example-com.md)
 - [no-server-trailing-slash](./rules/no-server-trailing-slash.md)
-- [no-empty-enum-servers](./rules/no-empty-enum-servers.md)
+- [no-server-variables-empty-enum](./rules/no-server-variables-empty-enum.md)
 - [no-undefined-server-variable](./rules/no-undefined-server-variable.md)
 
 ### Tags
diff --git a/docs/rules/no-empty-servers.md b/docs/rules/no-empty-servers.md
index 1f7e2ae2..ad6e9047 100644
--- a/docs/rules/no-empty-servers.md
+++ b/docs/rules/no-empty-servers.md
@@ -73,7 +73,7 @@ servers:
 ```
 
 ## Related rules
-- [no-server-example-com](./no-server-example-com.md)
+- [no-server-example.com](./no-server-example-com.md)
 - [no-server-trailing-slash](./no-server-trailing-slash.md)
 
 ## Resources
diff --git a/docs/rules/no-server-example-com.md b/docs/rules/no-server-example-com.md
index ff2bd174..da8a1a1d 100644
--- a/docs/rules/no-server-example-com.md
+++ b/docs/rules/no-server-example-com.md
@@ -1,4 +1,4 @@
-# no-server-example-com
+# no-server-example.com
 
 Prevents using `example.com` as the value of the `servers.url` fields in your API definitions.
 The rule checks for all URL schemes (`http`, `https`...).
@@ -37,7 +37,7 @@ An example configuration:
 ```yaml
 styleguide:
   rules:
-    no-server-example-com: error
+    no-server-example.com: error
 ```
 
 ## Examples
@@ -47,7 +47,7 @@ Given this configuration:
 ```yaml
 styleguide:
   rules:
-    no-server-example-com: error
+    no-server-example.com: error
 ```
 
 Example of **incorrect** server:
diff --git a/docs/rules/no-empty-enum-servers.md b/docs/rules/no-server-variables-empty-enum.md
similarity index 83%
rename from docs/rules/no-empty-enum-servers.md
rename to docs/rules/no-server-variables-empty-enum.md
index 92cabbbd..7a102453 100644
--- a/docs/rules/no-empty-enum-servers.md
+++ b/docs/rules/no-server-variables-empty-enum.md
@@ -1,4 +1,8 @@
-# no-empty-enum-servers
+---
+redirectFrom:
+  - /docs/cli/rules/no-empty-enum-servers/
+---
+# no-server-variables-empty-enum
 
 Disallow server variables without enum list defined.
 
@@ -36,7 +40,7 @@ An example configuration:
 ```yaml
 styleguide:
   rules:
-    no-empty-enum-servers: error
+    no-server-variables-empty-enum: error
 ```
 
 ## Examples
@@ -46,7 +50,7 @@ Given this configuration:
 ```yaml
 styleguide:
   rules:
-    no-empty-enum-servers: error
+    no-server-variables-empty-enum: error
 ```
 
 Example of **incorrect** server variables:
@@ -80,10 +84,10 @@ servers:
 ## Related rules
 
 - [no-empty-servers](./no-empty-servers.md)
-- [no-server-example-com](./no-server-example-com.md)
+- [no-server-example.com](./no-server-example-com.md)
 - [no-undefined-server-variable](./no-undefined-server-variable.md)
 
 ## Resources
 
-- [Rule source](https://github.com/Redocly/redocly-cli/blob/master/packages/core/src/rules/oas3/no-servers-empty-enum.ts)
+- [Rule source](https://github.com/Redocly/redocly-cli/blob/master/packages/core/src/rules/oas3/no-server-variables-empty-enum.ts)
 - [Servers list docs](https://redocly.com/docs/openapi-visual-reference/servers/)
diff --git a/docs/rules/no-undefined-server-variable.md b/docs/rules/no-undefined-server-variable.md
index d8a51b09..674d58cf 100644
--- a/docs/rules/no-undefined-server-variable.md
+++ b/docs/rules/no-undefined-server-variable.md
@@ -68,7 +68,8 @@ servers:
 ## Related rules
 
 - [no-empty-servers](./no-empty-servers.md)
-- [no-server-example-com](./no-server-example-com.md)
+- [no-server-example.com](./no-server-example-com.md)
+- [no-server-variables-empty-enum](./no-server-variables-empty-enum.md)
 
 ## Resources
 
diff --git a/packages/core/src/bundle.ts b/packages/core/src/bundle.ts
index 159aee29..42631e9f 100755
--- a/packages/core/src/bundle.ts
+++ b/packages/core/src/bundle.ts
@@ -306,7 +306,8 @@ function makeBundleVisitor(
       // eslint-disable-next-line @typescript-eslint/ban-ts-comment
       // @ts-ignore
       delete ref.$ref;
-      Object.assign(ref, resolved.node);
+      const obj = Object.assign({}, resolved.node, ref);
+      Object.assign(ref, obj); // assign ref itself again so ref fields take precedence
     }
   }
 
diff --git a/packages/core/src/config/all.ts b/packages/core/src/config/all.ts
index fefe8579..1aa23b8e 100644
--- a/packages/core/src/config/all.ts
+++ b/packages/core/src/config/all.ts
@@ -51,7 +51,7 @@ export default {
     'no-example-value-and-externalValue': 'error',
     'no-unused-components': 'error',
     'no-undefined-server-variable': 'error',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
   oas3_1Rules: {
     'no-server-example.com': 'error',
@@ -60,6 +60,6 @@ export default {
     'no-example-value-and-externalValue': 'error',
     'no-unused-components': 'error',
     'no-undefined-server-variable': 'error',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
 } as PluginStyleguideConfig;
diff --git a/packages/core/src/config/minimal.ts b/packages/core/src/config/minimal.ts
index 49241fc8..9a2b189e 100644
--- a/packages/core/src/config/minimal.ts
+++ b/packages/core/src/config/minimal.ts
@@ -44,7 +44,7 @@ export default {
     'no-example-value-and-externalValue': 'warn',
     'no-unused-components': 'warn',
     'no-undefined-server-variable': 'warn',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
   oas3_1Rules: {
     'no-invalid-media-type-examples': 'warn',
@@ -54,6 +54,6 @@ export default {
     'no-example-value-and-externalValue': 'warn',
     'no-unused-components': 'warn',
     'no-undefined-server-variable': 'warn',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
 } as PluginStyleguideConfig;
diff --git a/packages/core/src/config/recommended.ts b/packages/core/src/config/recommended.ts
index 56066405..d345159d 100644
--- a/packages/core/src/config/recommended.ts
+++ b/packages/core/src/config/recommended.ts
@@ -44,7 +44,7 @@ export default {
     'no-example-value-and-externalValue': 'error',
     'no-unused-components': 'warn',
     'no-undefined-server-variable': 'error',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
   oas3_1Rules: {
     'no-invalid-media-type-examples': 'warn',
@@ -54,6 +54,6 @@ export default {
     'no-example-value-and-externalValue': 'error',
     'no-unused-components': 'warn',
     'no-undefined-server-variable': 'error',
-    'no-servers-empty-enum': 'error',
+    'no-server-variables-empty-enum': 'error',
   },
 } as PluginStyleguideConfig;
diff --git a/packages/core/src/rules/oas3/index.ts b/packages/core/src/rules/oas3/index.ts
index 4265bbed..f3619288 100644
--- a/packages/core/src/rules/oas3/index.ts
+++ b/packages/core/src/rules/oas3/index.ts
@@ -37,7 +37,7 @@ import { NoUndefinedServerVariable } from './no-undefined-server-variable';
 import { OperationOperationId } from '../common/operation-operationId';
 import { OperationSummary } from '../common/operation-summary';
 import { NoAmbiguousPaths } from '../common/no-ambiguous-paths';
-import { NoEmptyEnumServers } from './no-servers-empty-enum';
+import { NoServerVariablesEmptyEnum } from './no-server-variables-empty-enum';
 import { NoHttpVerbsInPaths } from '../common/no-http-verbs-in-paths';
 import { RequestMimeType } from './request-mime-type';
 import { ResponseMimeType } from './response-mime-type';
@@ -89,7 +89,7 @@ export const rules = {
   'no-identical-paths': NoIdenticalPaths,
   'no-ambiguous-paths': NoAmbiguousPaths,
   'no-undefined-server-variable': NoUndefinedServerVariable,
-  'no-servers-empty-enum': NoEmptyEnumServers,
+  'no-server-variables-empty-enum': NoServerVariablesEmptyEnum,
   'no-http-verbs-in-paths': NoHttpVerbsInPaths,
   'path-excludes-patterns': PathExcludesPatterns,
   'request-mime-type': RequestMimeType,
diff --git a/packages/core/src/rules/oas3/no-servers-empty-enum.ts b/packages/core/src/rules/oas3/no-server-variables-empty-enum.ts
similarity index 97%
rename from packages/core/src/rules/oas3/no-servers-empty-enum.ts
rename to packages/core/src/rules/oas3/no-server-variables-empty-enum.ts
index cae4997e..38354e49 100644
--- a/packages/core/src/rules/oas3/no-servers-empty-enum.ts
+++ b/packages/core/src/rules/oas3/no-server-variables-empty-enum.ts
@@ -6,7 +6,7 @@ enum enumError {
   invalidDefaultValue = 'invalidDefaultValue',
 }
 
-export const NoEmptyEnumServers: Oas3Rule = () => {
+export const NoServerVariablesEmptyEnum: Oas3Rule = () => {
   return {
     DefinitionRoot(root, { report, location }) {
       if (!root.servers || root.servers.length === 0) return;
diff --git a/packages/core/src/types/redocly-yaml.ts b/packages/core/src/types/redocly-yaml.ts
index 8e801a41..44de25b2 100644
--- a/packages/core/src/types/redocly-yaml.ts
+++ b/packages/core/src/types/redocly-yaml.ts
@@ -40,7 +40,7 @@ const builtInRulesList = [
   'no-identical-paths',
   'no-ambiguous-paths',
   'no-undefined-server-variable',
-  'no-servers-empty-enum',
+  'no-server-variables-empty-enum',
   'no-http-verbs-in-paths',
   'path-excludes-patterns',
   'request-mime-type',


Test patch:
diff --git a/__tests__/bundle/bundle-description-dereferenced/.redocly.yaml b/__tests__/bundle/bundle-description-dereferenced/.redocly.yaml
new file mode 100644
index 00000000..c417a283
--- /dev/null
+++ b/__tests__/bundle/bundle-description-dereferenced/.redocly.yaml
@@ -0,0 +1,3 @@
+apis:
+  main:
+    root: ./test.yaml
diff --git a/__tests__/bundle/bundle-description-dereferenced/snapshot.js b/__tests__/bundle/bundle-description-dereferenced/snapshot.js
new file mode 100644
index 00000000..90f9195c
--- /dev/null
+++ b/__tests__/bundle/bundle-description-dereferenced/snapshot.js
@@ -0,0 +1,92 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`E2E bundle bundle-description-dereferenced 1`] = `
+openapi: 3.1.0
+paths:
+  /users:
+    post:
+      summary: user
+      description: User.
+      operationId: createUser
+      responses:
+        '200':
+          description: OK
+      requestBody:
+        description: Updated user object
+        content:
+          application/json:
+            schema:
+              description: Names (specific)
+              $ref: '#/components/schemas/Names'
+        required: true
+components:
+  schemas:
+    Name:
+      type: string
+      description: Generic Name.
+    Names:
+      type: object
+      description: names description
+      properties:
+        oneName:
+          $ref: '#/components/schemas/Name'
+          description: One name (specific).
+        otherName:
+          $ref: '#/components/schemas/Name'
+          description: Other name (specific).
+
+No configurations were defined in extends -- using built in recommended configuration by default.
+Warning! This default behavior is going to be deprecated soon.
+
+test.yaml:
+  1:1  error    spec  The field \`info\` must be present on this level.
+
+< ... 2 more problems hidden > increase with \`--max-problems N\`
+❌ Validation failed with 2 errors and 1 warning.
+run \`openapi lint --generate-ignore-file\` to add all problems to the ignore file.
+
+bundling ./test.yaml...
+📦 Created a bundle for ./test.yaml at stdout <test>ms.
+
+`;
+
+exports[`E2E bundle with option: dereferenced description should not be from $ref 1`] = `
+openapi: 3.1.0
+paths:
+  /users:
+    post:
+      summary: user
+      description: User.
+      operationId: createUser
+      responses:
+        '200':
+          description: OK
+      requestBody:
+        description: Updated user object
+        content:
+          application/json:
+            schema:
+              description: Names (specific)
+              type: object
+              properties: &ref_0
+                oneName:
+                  description: One name (specific).
+                  type: string
+                otherName:
+                  description: Other name (specific).
+                  type: string
+        required: true
+components:
+  schemas:
+    Name:
+      type: string
+      description: Generic Name.
+    Names:
+      type: object
+      description: names description
+      properties: *ref_0
+
+bundling test.yaml...
+📦 Created a bundle for test.yaml at stdout <test>ms.
+
+`;
diff --git a/__tests__/bundle/bundle-description-dereferenced/test.yaml b/__tests__/bundle/bundle-description-dereferenced/test.yaml
new file mode 100644
index 00000000..24ad6004
--- /dev/null
+++ b/__tests__/bundle/bundle-description-dereferenced/test.yaml
@@ -0,0 +1,33 @@
+openapi: 3.1.0
+paths:
+  /users:
+    post:
+      summary: user
+      description: User.
+      operationId: createUser
+      responses:
+        '200':
+          description: OK
+      requestBody:
+        description: Updated user object
+        content:
+          application/json:
+            schema:
+              description: Names (specific)
+              $ref: '#/components/schemas/Names'
+        required: true
+components:
+  schemas:
+    Name:
+      type: string
+      description: Generic Name.
+    Names:
+      type: object
+      description: names description
+      properties:
+        oneName:
+          $ref: '#/components/schemas/Name'
+          description: One name (specific).
+        otherName:
+          $ref: '#/components/schemas/Name'
+          description: Other name (specific).
diff --git a/__tests__/commands.test.ts b/__tests__/commands.test.ts
index 36cb7bbe..b6039a48 100644
--- a/__tests__/commands.test.ts
+++ b/__tests__/commands.test.ts
@@ -220,4 +220,17 @@ describe('E2E', () => {
       );
     });
   });
+
+  describe('bundle with option: dereferenced', () => {
+    it('description should not be from $ref', () => {
+      const folderPath = join(__dirname, `bundle/bundle-description-dereferenced`);
+      const args = getParams('../../../packages/cli/src/index.ts', 'bundle', [
+        'test.yaml',
+        '--dereferenced',
+      ]);
+
+      const result = getCommandOutput(args, folderPath);
+      (<any>expect(result)).toMatchSpecificSnapshot(join(folderPath, 'snapshot.js'));
+    });
+  });
 });
diff --git a/__tests__/lint/no-servers-empty-enum-errror/.redocly.yaml b/__tests__/lint/no-server-variables-empty-enum-errror/.redocly.yaml
similarity index 64%
rename from __tests__/lint/no-servers-empty-enum-errror/.redocly.yaml
rename to __tests__/lint/no-server-variables-empty-enum-errror/.redocly.yaml
index 963cb7c9..bbacf150 100644
--- a/__tests__/lint/no-servers-empty-enum-errror/.redocly.yaml
+++ b/__tests__/lint/no-server-variables-empty-enum-errror/.redocly.yaml
@@ -4,5 +4,5 @@ apis:
 
 styleguide:
   rules:
-    no-servers-empty-enum: error
+    no-server-variables-empty-enum: error
   extends: []
diff --git a/__tests__/lint/no-servers-empty-enum-errror/openapi.yaml b/__tests__/lint/no-server-variables-empty-enum-errror/openapi.yaml
similarity index 100%
rename from __tests__/lint/no-servers-empty-enum-errror/openapi.yaml
rename to __tests__/lint/no-server-variables-empty-enum-errror/openapi.yaml
diff --git a/__tests__/lint/no-servers-empty-enum-errror/snapshot.js b/__tests__/lint/no-server-variables-empty-enum-errror/snapshot.js
similarity index 80%
rename from __tests__/lint/no-servers-empty-enum-errror/snapshot.js
rename to __tests__/lint/no-server-variables-empty-enum-errror/snapshot.js
index 7a079fd3..3f1a36d3 100644
--- a/__tests__/lint/no-servers-empty-enum-errror/snapshot.js
+++ b/__tests__/lint/no-server-variables-empty-enum-errror/snapshot.js
@@ -1,6 +1,6 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`E2E lint no-servers-empty-enum-errror 1`] = `
+exports[`E2E lint no-server-variables-empty-enum-errror 1`] = `
 
 validating /openapi.yaml...
 [1] openapi.yaml:5:1 at #/servers
@@ -14,7 +14,7 @@ Server variable with \`enum\` must be a non-empty array.
 6 |   - url: https://example.com/user/{id}/place/{placeId}
 7 |     variables:
 
-Error was generated by the no-servers-empty-enum rule.
+Error was generated by the no-server-variables-empty-enum rule.
 
 
 [2] openapi.yaml:5:1 at #/servers
@@ -28,7 +28,7 @@ Server variable define \`enum\` and \`default\`. \`enum\` must include default v
 6 |   - url: https://example.com/user/{id}/place/{placeId}
 7 |     variables:
 
-Error was generated by the no-servers-empty-enum rule.
+Error was generated by the no-server-variables-empty-enum rule.
 
 
 /openapi.yaml: validated in <test>ms
diff --git a/__tests__/lint/no-servers-empty-enum/.redocly.yaml b/__tests__/lint/no-server-variables-empty-enum/.redocly.yaml
similarity index 64%
rename from __tests__/lint/no-servers-empty-enum/.redocly.yaml
rename to __tests__/lint/no-server-variables-empty-enum/.redocly.yaml
index 963cb7c9..bbacf150 100644
--- a/__tests__/lint/no-servers-empty-enum/.redocly.yaml
+++ b/__tests__/lint/no-server-variables-empty-enum/.redocly.yaml
@@ -4,5 +4,5 @@ apis:
 
 styleguide:
   rules:
-    no-servers-empty-enum: error
+    no-server-variables-empty-enum: error
   extends: []
diff --git a/__tests__/lint/no-servers-empty-enum/openapi.yaml b/__tests__/lint/no-server-variables-empty-enum/openapi.yaml
similarity index 100%
rename from __tests__/lint/no-servers-empty-enum/openapi.yaml
rename to __tests__/lint/no-server-variables-empty-enum/openapi.yaml
diff --git a/__tests__/lint/no-servers-empty-enum/snapshot.js b/__tests__/lint/no-server-variables-empty-enum/snapshot.js
similarity index 74%
rename from __tests__/lint/no-servers-empty-enum/snapshot.js
rename to __tests__/lint/no-server-variables-empty-enum/snapshot.js
index 7afc301c..f9158940 100644
--- a/__tests__/lint/no-servers-empty-enum/snapshot.js
+++ b/__tests__/lint/no-server-variables-empty-enum/snapshot.js
@@ -1,6 +1,6 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`E2E lint no-servers-empty-enum 1`] = `
+exports[`E2E lint no-server-variables-empty-enum 1`] = `
 
 validating /openapi.yaml...
 /openapi.yaml: validated in <test>ms
diff --git a/packages/core/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap b/packages/core/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap
index b9b738e2..a4361c16 100644
--- a/packages/core/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap
+++ b/packages/core/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap
@@ -15,7 +15,7 @@ Object {
     "no-invalid-media-type-examples": "error",
     "no-server-example.com": "warn",
     "no-server-trailing-slash": "error",
-    "no-servers-empty-enum": "error",
+    "no-server-variables-empty-enum": "error",
     "no-undefined-server-variable": "error",
     "no-unused-components": "warn",
   },
@@ -27,7 +27,7 @@ Object {
     "no-invalid-media-type-examples": "error",
     "no-server-example.com": "warn",
     "no-server-trailing-slash": "error",
-    "no-servers-empty-enum": "error",
+    "no-server-variables-empty-enum": "error",
     "no-undefined-server-variable": "error",
     "no-unused-components": "warn",
   },
@@ -86,7 +86,7 @@ Object {
     "no-invalid-media-type-examples": "warn",
     "no-server-example.com": "warn",
     "no-server-trailing-slash": "error",
-    "no-servers-empty-enum": "error",
+    "no-server-variables-empty-enum": "error",
     "no-undefined-server-variable": "error",
     "no-unused-components": "warn",
   },
@@ -98,7 +98,7 @@ Object {
     "no-invalid-media-type-examples": "warn",
     "no-server-example.com": "warn",
     "no-server-trailing-slash": "error",
-    "no-servers-empty-enum": "error",
+    "no-server-variables-empty-enum": "error",
     "no-undefined-server-variable": "error",
     "no-unused-components": "warn",
   },
diff --git a/packages/core/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts b/packages/core/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts
index bae9acb1..38a6d7a6 100644
--- a/packages/core/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts
+++ b/packages/core/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts
@@ -3,8 +3,8 @@ import { lintDocument } from '../../../lint';
 import { parseYamlToDocument, replaceSourceWithRef, makeConfig } from '../../../../__tests__/utils';
 import { BaseResolver } from '../../../resolve';
 
-describe('Oas3 as3-no-servers-empty-enum', () => {
-  it('oas3-no-servers-empty-enum: should report on server object with empty enum and unknown enum value', async () => {
+describe('Oas3 as3-no-server-variables-empty-enum', () => {
+  it('oas3-no-server-variables-empty-enum: should report on server object with empty enum and unknown enum value', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -24,7 +24,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`
@@ -38,7 +38,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
             },
           ],
           "message": "Server variable with \`enum\` must be a non-empty array.",
-          "ruleId": "no-servers-empty-enum",
+          "ruleId": "no-server-variables-empty-enum",
           "severity": "error",
           "suggest": Array [],
         },
@@ -51,7 +51,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
             },
           ],
           "message": "Server variable define \`enum\` and \`default\`. \`enum\` must include default value",
-          "ruleId": "no-servers-empty-enum",
+          "ruleId": "no-server-variables-empty-enum",
           "severity": "error",
           "suggest": Array [],
         },
@@ -59,7 +59,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     `);
   });
 
-  it('oas3-no-servers-empty-enum: should report on server object with empty enum', async () => {
+  it('oas3-no-server-variables-empty-enum: should report on server object with empty enum', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -78,7 +78,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`
@@ -92,7 +92,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
             },
           ],
           "message": "Server variable with \`enum\` must be a non-empty array.",
-          "ruleId": "no-servers-empty-enum",
+          "ruleId": "no-server-variables-empty-enum",
           "severity": "error",
           "suggest": Array [],
         },
@@ -100,7 +100,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     `);
   });
 
-  it('oas3-no-servers-empty-enum: should be success because variables is empty object', async () => {
+  it('oas3-no-server-variables-empty-enum: should be success because variables is empty object', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -117,13 +117,13 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`Array []`);
   });
 
-  it('oas3-no-servers-empty-enum: should be success because variable is empty object', async () => {
+  it('oas3-no-server-variables-empty-enum: should be success because variable is empty object', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -141,13 +141,13 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`Array []`);
   });
 
-  it('oas3-no-servers-empty-enum: should be success because enum contains default value', async () => {
+  it('oas3-no-server-variables-empty-enum: should be success because enum contains default value', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -168,13 +168,13 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`Array []`);
   });
 
-  it('oas3-no-servers-empty-enum: should be success because enum contains default value', async () => {
+  it('oas3-no-server-variables-empty-enum: should be success because enum contains default value', async () => {
     const document = parseYamlToDocument(
       outdent`
         openapi: 3.0.0
@@ -197,7 +197,7 @@ describe('Oas3 as3-no-servers-empty-enum', () => {
     const results = await lintDocument({
       externalRefResolver: new BaseResolver(),
       document,
-      config: await makeConfig({ 'no-servers-empty-enum': 'error' }),
+      config: await makeConfig({ 'no-server-variables-empty-enum': 'error' }),
     });
 
     expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`Array []`);