Skip to content

Conversation

@pooja-bruno
Copy link
Collaborator

@pooja-bruno pooja-bruno commented Dec 3, 2025

Description

Fix OpenAPI 3 import to handle requestBody $ref pointing to #/components/requestBodies/... where the referenced schema has properties.

jira
issue: #4808

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Summary by CodeRabbit

  • Bug Fixes

    • Broadened detection of object-like OpenAPI request bodies: schemas with properties (even without explicit "object" type) now populate JSON payloads, form-urlencoded fields, and multipart fields. Arrays with object-like items and numeric defaults (integer/number) are handled more inclusively.
  • Tests

    • Added tests covering JSON, form-urlencoded, multipart bodies, numeric defaults, nested objects in arrays, and nested property population.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

The OpenAPI-to-Bruno converter now treats schemas that declare properties as object-like even without type: 'object', including for array items. JSON, formUrlEncoded, and multipartForm body population iterate properties when present. Numeric primitives map number (and integer) to 0. Security scheme check uses .length.

Changes

Cohort / File(s) Summary
OpenAPI Schema Detection Enhancement
packages/bruno-converters/src/openapi/openapi-to-bruno.js
Treats schemas with a properties field as object-like across JSON, application/x-www-form-urlencoded, and multipart/form-data handling; iterates properties when present to populate bodies. Detects items.properties in arrays as nested objects. Maps number and integer to 0. Replaces an Object.keys length comparison with .length in security handling.
Test Coverage — Request Body Variants
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
Adds Jest tests for $refed requestBody entries and inline schemas lacking type: 'object', validating JSON, formUrlEncoded, and multipartForm population, nested object items, and numeric/default value behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect properties-based object detection to ensure it doesn't erroneously treat non-object schemas as objects.
  • Verify recursive construction in buildEmptyJsonBody handles arrays with items.properties without infinite recursion.
  • Run the new Jest tests plus existing OpenAPI tests to catch regressions.

Poem

✨ A schema hid its shape in plain sight,
Properties called out, now treated right.
JSON, form, and multipart sing along,
Numbers settled — defaults hum a song.
Tests nod, nested fields stand strong.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: openapi body import' directly summarizes the main change—fixing OpenAPI requestBody import handling for $ref entries with properties.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2aa02f1 and 28ef27b.

📒 Files selected for processing (1)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: Unit Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: CLI Tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)

1-66: Test coverage validates the JSON case well.

The test confirms that schemas with properties but no explicit type: object are correctly imported. However, the implementation changes also affect formUrlEncoded and multipartForm content types (lines 501 and 514 in openapi-to-bruno.js).

Consider adding test cases for these content types to ensure comprehensive coverage of the fix.

Example additional test cases:

it('should import body fields for form-urlencoded when schema has properties without explicit type: object', () => {
  const openApiSpec = `
openapi: "3.0.0"
info:
  version: "1.0.0"
  title: "FormUrlEncoded Test"
servers:
  - url: "https://api.example.com"
paths:
  /submit:
    post:
      operationId: "submitForm"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                name:
                  type: string
                email:
                  type: string
      responses:
        '200':
          description: "OK"
`;

  const result = openApiToBruno(openApiSpec);
  expect(result.items[0].request.body.mode).toBe('formUrlEncoded');
  expect(result.items[0].request.body.formUrlEncoded.length).toBe(2);
});
packages/bruno-converters/src/openapi/openapi-to-bruno.js (1)

163-165: Minor inconsistency in object-like schema detection.

The getExampleFromSchema function uses (schema.properties && !schema.type) while the new changes at lines 492, 501, 514 use just bodySchema.properties. The new approach is more permissive.

Consider aligning the conditions for consistency:

-  if (schema.type === 'object' || (schema.properties && !schema.type)) {
+  if (schema.type === 'object' || schema.properties) {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3d2d35 and 5680a8b.

📒 Files selected for processing (2)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js (3 hunks)
  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions: () => {}
No space between function name and parentheses: func() not func ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧠 Learnings (1)
📚 Learning: 2025-12-03T08:09:57.124Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-03T08:09:57.124Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Applied to files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧬 Code graph analysis (1)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (2)
  • openApiToBruno (1177-1195)
  • openApiToBruno (1177-1195)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Unit Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (3)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (3)

492-498: Logic correctly handles schemas with implicit object type.

The condition now properly detects object-like schemas that define properties without an explicit type: object. The subsequent array check on line 496 ensures no conflict with array-typed bodies.


499-511: Consistent extension for formUrlEncoded handling.

The change aligns with the JSON body handling pattern. The fallback to empty object in each(bodySchema.properties || {}, ...) ensures safe iteration.


512-525: Consistent extension for multipartForm handling.

Mirrors the formUrlEncoded pattern correctly.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 3, 2025
Copy link

@tthornton3-chwy tthornton3-chwy left a comment

Choose a reason for hiding this comment

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

My approval means nothing haha but I just got hit by this, and am excited to see it in! Is there a mechanism set up here to spit out a "dev" package of this up on npmjs or packaged as a zip, etc? I can build it myself and push it to our artifactory for the time being, but that'd be awesome if the former was an option!

@tthornton3-chwy
Copy link

@pooja-bruno You can ignore that comment, I built it myself while we wait for this to come in, and keeping it packaged in the devtools repo we got :)
But, I did bump into one issue, which this PR should resolve/extend upon this with! https://github.com/pooja-bruno/bruno/pull/6/files Essentially we have arrays that are ref, which needs the same treatment you started here!

@pooja-bruno
Copy link
Collaborator Author

Hey @tthornton3-chwy,

Can you re-open the PR, I'm not used to PRs being raised on my forks. Apologies if you think I stole your credit, I'd stay away from raising forks on the internal dev forks since the commits are squashed and you might loose your credit if we aren't careful while merging.

For this specific case, I'll be cherry picking your commit into the repo to make sure it goes in with your name.

This reverts commit 3219e8a.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (2)

492-495: Consider alignment with getExampleFromSchema defensive check.

Line 163 uses (schema.properties && !schema.type) to explicitly verify that type is not set before treating a schema as object-like. Your change at line 492 uses bodySchema.properties without the !schema.type guard. This means if a malformed schema has both type: 'string' and properties: {...}, line 163 would not treat it as an object, but line 492 would.

For well-formed OpenAPI specs this shouldn't matter, but consider whether you want to mirror the defensive pattern from line 163 for consistency.

Apply this diff if you want to align with line 163's pattern:

-    if (bodySchema && (bodySchema.type === 'object' || bodySchema.properties)) {
+    if (bodySchema && (bodySchema.type === 'object' || (bodySchema.properties && !bodySchema.type))) {

492-495: Consider extracting repeated object-like detection logic.

The condition (bodySchema.type === 'object' || bodySchema.properties) is duplicated across lines 492, 501, and 514. Extracting this to a helper function like isObjectLikeSchema(schema) would improve maintainability and make future updates easier.

Example helper:

const isObjectLikeSchema = (schema) => {
  return schema && (schema.type === 'object' || schema.properties);
};

Then use it at lines 492, 501, 514:

-    if (bodySchema && (bodySchema.type === 'object' || bodySchema.properties)) {
+    if (isObjectLikeSchema(bodySchema)) {

Also applies to: 501-511, 514-525

packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)

1-158: Expand test coverage for edge cases.

The current tests cover basic happy paths well, but consider adding tests for:

  • Nested objects: Schemas with properties containing object-type properties
  • Array fields: Properties of type array with object items
  • Empty properties: Schema with properties: {} to ensure no errors
  • Mixed explicit type: Schema with both type: 'object' and properties to verify existing behavior isn't broken
  • Number type fields: While integer is tested implicitly, explicit tests with type: 'number' fields would validate numeric handling

Based on learnings, comprehensive test coverage for new functionality helps catch regressions.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3219e8a and fd9a336.

📒 Files selected for processing (2)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js (3 hunks)
  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions: () => {}
No space between function name and parentheses: func() not func ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧠 Learnings (1)
📚 Learning: 2025-12-03T08:09:57.124Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-03T08:09:57.124Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Applied to files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧬 Code graph analysis (1)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (2)
  • openApiToBruno (1177-1195)
  • openApiToBruno (1177-1195)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
🔇 Additional comments (1)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)

5-66: Test implementation looks solid.

All three test cases properly validate the fix for $ref resolution with inline schemas. They:

  • Use realistic OpenAPI specs with $ref pointing to components/requestBodies
  • Verify correct body mode assignment
  • Validate that properties are properly extracted and populated

Good work covering the JSON, formUrlEncoded, and multipartForm scenarios.

Also applies to: 68-111, 113-157

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)

4-85: Solid coverage for JSON requestBody $ref with inline properties; consider asserting nested numeric fields

This test nicely nails the core regression: requestBody resolving via $ref to components.requestBodies where the schema only defines properties, plus the nested fees array whose items are a $ref. That’s exactly aligned with the PR objective and the testing guideline of covering new behavior. Based on learnings, this is the right place for the regression test.

If you want slightly stronger coverage with minimal noise, you could also assert that the fees object includes all defined properties (e.g. amount as a number), e.g.:

-    expect(bodyJson['fees'][0]).toHaveProperty('id');
+    expect(bodyJson['fees'][0]).toHaveProperty('id');
+    expect(bodyJson['fees'][0]).toHaveProperty('amount');

This would guard against regressions where only a subset of properties from the referenced schema are picked up.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd9a336 and de427df.

📒 Files selected for processing (2)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js (4 hunks)
  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions: () => {}
No space between function name and parentheses: func() not func ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧠 Learnings (1)
📚 Learning: 2025-12-03T08:09:57.124Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-03T08:09:57.124Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Add tests for any new functionality or meaningful changes; update corresponding tests when code is added, removed, or significantly modified

Applied to files:

  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧬 Code graph analysis (1)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (2)
  • openApiToBruno (1177-1195)
  • openApiToBruno (1177-1195)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: CLI Tests
  • GitHub Check: Unit Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Linux
🔇 Additional comments (3)
packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (3)

87-130: formUrlEncoded $ref coverage looks correct and focused

The test clearly verifies that a requestBody $ref with an inline schema (no explicit type: object) is imported as formUrlEncoded with the expected field names. Assertions are tight and aligned with the converter behavior.


132-176: multipart/form-data $ref handling is well covered

Good targeted check that a $ref-based requestBody with inline properties for multipart/form-data ends up in multipartForm mode with the expected fields (file, description). This complements the JSON and formUrlEncoded cases nicely.


1-2: Confirm openApiToBruno export style matches this default import

If openApiToBruno is only a named export (export const openApiToBruno = ...), this default import will be undefined at runtime. Either ensure there is an export default openApiToBruno in src/openapi/openapi-to-bruno.js, or switch this line to a named import:

-import openApiToBruno from '../../../src/openapi/openapi-to-bruno';
+import { openApiToBruno } from '../../../src/openapi/openapi-to-bruno';

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (1)

926-935: Minor bug: empty securitySchemes check uses array equality instead of length

if (Object.keys(securitySchemes) === 0) will never be true because it compares an array to 0. This means the early-return path for “no security schemes” is effectively dead code, even when components.securitySchemes is an empty object.

Consider changing it to:

-  if (Object.keys(securitySchemes) === 0) {
+  if (Object.keys(securitySchemes).length === 0) {

Functionally this only affects specs that define components.securitySchemes: {} with no entries, so it’s safe but worth correcting.

🧹 Nitpick comments (2)
packages/bruno-converters/src/openapi/openapi-to-bruno.js (2)

129-146: Improved empty JSON body construction for object-like and numeric schemas looks good

Broadening object detection to prop.properties and treating both integer and number as 0 is a sensible enhancement and should better support schemas where type: 'object' is omitted or where array items are $ref-resolved objects. This should help avoid missing nested structures in generated bodies without impacting existing primitive handling.

If you find this pattern repeating further, consider a small helper like isObjectSchema(schema) (checking type === 'object' || schema.properties) to centralize object-likeness checks across the file.


490-525: Expanded object-like detection for JSON, formUrlEncoded, and multipart bodies aligns with requestBody $ref needs

Updating the checks to bodySchema && (bodySchema.type === 'object' || bodySchema.properties) for JSON, application/x-www-form-urlencoded, and multipart/form-data correctly covers request bodies whose schemas only define properties (common when coming from $ref into components/requestBodies). This should fix the missing field imports called out in BRU-2128 and still preserves previous behavior for explicit type: 'object' schemas and arrays.

You might later want to hoist const isObjectSchema = bodySchema && (bodySchema.type === 'object' || bodySchema.properties); to avoid repeating the same condition three times.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de427df and 2aa02f1.

📒 Files selected for processing (2)
  • packages/bruno-converters/src/openapi/openapi-to-bruno.js (4 hunks)
  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-converters/tests/openapi/openapi-to-bruno/openapi-body.spec.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions: () => {}
No space between function name and parentheses: func() not func ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments

Files:

  • packages/bruno-converters/src/openapi/openapi-to-bruno.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: Unit Tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants