Skip to content

Conversation

@predic8
Copy link
Member

@predic8 predic8 commented Dec 7, 2025

  • Removed unnecessary blank lines in tutorials
  • Standardized membrane.sh command usage with ./ prefix
  • Clarified comments and improved header examples, adding "X-Name" output logic

Summary by CodeRabbit

  • Documentation

    • Fixed support contact wording in README
    • Updated tutorial titles and examples for clarity
  • New Features

    • Added authentication (admin/admin credentials) and read-only protection to Admin Web Console
    • Enhanced SetHeader tutorial with header manipulation functionality
  • Chores

    • Cleaned up whitespace and formatting across tutorial files
    • Standardized command references in shell scripts

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

- Removed unnecessary blank lines in tutorials - Standardized membrane.sh command usage with `./` prefix - Clarified comments and improved header examples, adding "X-Name" output logic
@predic8 predic8 added the 7.x label Dec 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Walkthrough

This PR consolidates whitespace cleanup, documentation corrections, and minor tutorial updates across the distribution folder. Changes include removing extraneous blank lines, updating shell command paths, adding authentication configuration to the Admin Web Console tutorial, and refining SetHeader tutorial documentation.

Changes

Cohort / File(s) Summary
Documentation & README Updates
distribution/router/README.txt
Fixed typo in Support section phrasing; replaced "professional suppor" with "support"
Whitespace Cleanup
distribution/tutorials/getting-started/10-Logging.yaml, 40-Basic-Path-Routing.yaml, 50-Short-Circuit.yaml, 70-Template.yaml, 80-OpenAPI.yaml, 90-OpenAPI-Validation.yaml
Removed leading blank lines at file start; no semantic changes
YAML Structure Fixes
distribution/tutorials/getting-started/00-First-API.yaml
Removed stray leading dash; fixed invalid list indicator
Command Path Updates
distribution/tutorials/getting-started/20-Message-Flow.yaml, 30-Message-Flow2.yaml
Updated startup command from membrane.sh to ./membrane.sh with minor formatting adjustments
Authentication Configuration
distribution/tutorials/getting-started/45-Admin-Web-Console.yaml
Added top-level api block with basicAuthentication (admin/admin) and readOnly adminConsole configuration
Tutorial Documentation & Examples
distribution/tutorials/getting-started/60-SetHeader.yaml
Updated title capitalization, added setHeader step with name X-Name and template value, refined example usage documentation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • 45-Admin-Web-Console.yaml: Review new authentication configuration (basicAuthentication, adminConsole settings) for correctness and security implications
  • 60-SetHeader.yaml: Validate new setHeader step logic and template variable interpolation syntax

Possibly related PRs

Suggested reviewers

  • rrayst

Poem

🐰 Blank lines banished, paths made clear,
Tutorials brightened, auth draws near—
SetHeaders dance with templated grace,
Admin console finds its place!
Whisker-twitches

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 accurately captures the main changes: cleanup of YAML tutorials (removing blank lines, whitespace fixes) and updates to script references (adding ./ prefix to membrane.sh commands).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch small-corrections

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6293988 and b79c54e.

📒 Files selected for processing (12)
  • distribution/router/README.txt (1 hunks)
  • distribution/tutorials/getting-started/00-First-API.yaml (0 hunks)
  • distribution/tutorials/getting-started/10-Logging.yaml (0 hunks)
  • distribution/tutorials/getting-started/20-Message-Flow.yaml (1 hunks)
  • distribution/tutorials/getting-started/30-Message-Flow2.yaml (2 hunks)
  • distribution/tutorials/getting-started/40-Basic-Path-Routing.yaml (0 hunks)
  • distribution/tutorials/getting-started/45-Admin-Web-Console.yaml (1 hunks)
  • distribution/tutorials/getting-started/50-Short-Circuit.yaml (0 hunks)
  • distribution/tutorials/getting-started/60-SetHeader.yaml (2 hunks)
  • distribution/tutorials/getting-started/70-Template.yaml (0 hunks)
  • distribution/tutorials/getting-started/80-OpenAPI.yaml (0 hunks)
  • distribution/tutorials/getting-started/90-OpenAPI-Validation.yaml (0 hunks)
💤 Files with no reviewable changes (7)
  • distribution/tutorials/getting-started/80-OpenAPI.yaml
  • distribution/tutorials/getting-started/70-Template.yaml
  • distribution/tutorials/getting-started/10-Logging.yaml
  • distribution/tutorials/getting-started/40-Basic-Path-Routing.yaml
  • distribution/tutorials/getting-started/50-Short-Circuit.yaml
  • distribution/tutorials/getting-started/90-OpenAPI-Validation.yaml
  • distribution/tutorials/getting-started/00-First-API.yaml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-23T15:59:51.742Z
Learnt from: rrayst Repo: membrane/api-gateway PR: 2339 File: distribution/examples/web-services-soap/rest2soap-template/apis.yaml:17-32 Timestamp: 2025-11-23T15:59:51.742Z Learning: In Membrane API Gateway YAML configuration files, response flows execute in reverse order. Steps that appear later in the response flow list actually execute first. For example, if a template references properties and setProperty steps appear after the template in the YAML, those setProperty steps will execute before the template renders. 

Applied to files:

  • distribution/tutorials/getting-started/20-Message-Flow.yaml
  • distribution/tutorials/getting-started/30-Message-Flow2.yaml
📚 Learning: 2025-11-15T18:38:23.728Z
Learnt from: predic8 Repo: membrane/api-gateway PR: 2322 File: core/src/main/java/com/predic8/membrane/core/lang/CommonBuiltInFunctions.java:18-26 Timestamp: 2025-11-15T18:38:23.728Z Learning: In the membrane/api-gateway repository, the maintainer predic8 prefers fail-fast behavior where NullPointerExceptions are allowed to crash rather than being caught or having defensive null checks that silently return null, as it makes debugging easier by showing where problems originate. 

Applied to files:

  • distribution/router/README.txt
⏰ 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). (2)
  • GitHub Check: Automated tests
  • GitHub Check: Analyze (java)
🔇 Additional comments (6)
distribution/router/README.txt (1)

42-42: Documentation improvement: Simplified support section text.

The change from "For professional support see:" to "For support see:" improves clarity and reduces unnecessary qualification. The update aligns well with the PR objective to clarify documentation.

distribution/tutorials/getting-started/60-SetHeader.yaml (1)

3-3: Tutorial improvements look good.

The changes strengthen the setHeader tutorial by:

  • Adding a second curl example that demonstrates body-based interpolation
  • Introducing a third setHeader pattern (X-Name with ${body}) alongside static (X-Powered-By) and variable (X-Method) examples
  • Generalizing the instruction to match the expanded content

The YAML syntax is correct, and the example correctly demonstrates interpolating the request body ("Hugo") into the response header ("Hi Hugo!").

Also applies to: 5-10, 22-24

distribution/tutorials/getting-started/20-Message-Flow.yaml (1)

10-10: Good standardization of the command path.

The change from membrane.sh to ./membrane.sh makes the tutorial documentation more explicit and follows shell script best practices by clearly indicating the script is in the current directory.

distribution/tutorials/getting-started/30-Message-Flow2.yaml (2)

11-11: Consistent command path standardization.

The update to ./membrane.sh mirrors the same improvement across other tutorials and maintains clarity in tutorial instructions.


24-24: Formatting consistency achieved.

The whitespace adjustment aligns with the PR objective to clean up unnecessary blank lines, improving overall document consistency.

distribution/tutorials/getting-started/45-Admin-Web-Console.yaml (1)

16-27: Authentication configuration correctly complements tutorial documentation.

The addition of the basicAuthentication block with admin credentials and the adminConsole configuration makes the tutorial executable and demonstrates the authentication mechanism documented in the comments (lines 14–15). The hardcoded credentials are appropriate for tutorial purposes, and the placement before other API blocks ensures the admin console authentication is isolated from the downstream APIs.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@rrayst rrayst merged commit f5a416c into master Dec 8, 2025
5 checks passed
@rrayst rrayst deleted the small-corrections branch December 8, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants