Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: Mark Markdown endpoints as stable (#44493)

Penar Musarajbfbd98f2009f
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 31ddbb3ee41..1d741a36d82 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -4791,7 +4791,7 @@ experimental:
hidden: true
client: true
upcoming_change:
- status: "beta"
+ status: "stable"
impact: "feature,all_members"
learn_more_url: "https://meta.discourse.org/t/-/413006"
allow_enabled_for:
diff --git a/spec/requests/markdown_endpoints_spec.rb b/spec/requests/markdown_endpoints_spec.rb
index e0628301e29..0b2bb58a2ee 100644
--- a/spec/requests/markdown_endpoints_spec.rb
+++ b/spec/requests/markdown_endpoints_spec.rb
@@ -12,9 +12,20 @@ RSpec.describe "Markdown endpoints" do
after { category.clear_url_cache }
- it "respects the upcoming change promotion policy and explicit opt-in" do
+ it "automatically enables Markdown endpoints when stable changes are promoted" do
SiteSetting.promote_upcoming_changes_on_status = "stable"
+ get "/latest.md"
+ expect(response).to have_http_status(:ok)
+ expect(response.media_type).to eq("text/markdown")
+
+ get "/latest", headers: { "ACCEPT" => "text/html" }
+ expect(response.headers["Link"]).to include("/latest.md")
+ end
+
+ it "respects explicit opt-in when automatic promotion is disabled" do
+ SiteSetting.promote_upcoming_changes_on_status = "never"
+
get "/latest.md"
expect(response).to have_http_status(:not_found)