Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8e3c7c03
Commit
8e3c7c03
authored
Feb 19, 2021
by
Arturo Herrero
Committed by
Bob Van Landuyt
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add changelog for enabling feature flag
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9152d118
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
changelogs/unreleased/default-enabled-api_always_use_application_json.yml
...eased/default-enabled-api_always_use_application_json.yml
+5
-0
config/feature_flags/development/api_always_use_application_json.yml
...ure_flags/development/api_always_use_application_json.yml
+1
-1
doc/api/README.md
doc/api/README.md
+1
-1
lib/api/api.rb
lib/api/api.rb
+1
-1
No files found.
changelogs/unreleased/default-enabled-api_always_use_application_json.yml
0 → 100644
View file @
8e3c7c03
---
title
:
Change default API content_type to JSON
merge_request
:
54479
author
:
type
:
changed
config/feature_flags/development/api_always_use_application_json.yml
View file @
8e3c7c03
...
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/270067
milestone
:
'
13.6'
type
:
development
group
:
group::ecosystem
default_enabled
:
fals
e
default_enabled
:
tru
e
doc/api/README.md
View file @
8e3c7c03
...
...
@@ -750,7 +750,7 @@ specifically used by GitLab.com, see
The GitLab API supports the
`application/json`
content type by default, though
some API endpoints also support
`text/plain`
.
In
[
GitLab 13.
9
and later
](
https://gitlab.com/gitlab-org/gitlab/-/issues/250342
)
,
In
[
GitLab 13.
10
and later
](
https://gitlab.com/gitlab-org/gitlab/-/issues/250342
)
,
API endpoints do not support
`text/plain`
by default, unless it's explicitly documented.
This change is deployed behind the
`:api_always_use_application_json`
[
feature flag
](
../user/feature_flags.md
)
,
...
...
lib/api/api.rb
View file @
8e3c7c03
...
...
@@ -147,7 +147,7 @@ module API
# Only overwrite `text/plain+deprecated`
if
content_types
[
api_format
]
==
'text/plain+deprecated'
if
Feature
.
enabled?
(
:api_always_use_application_json
)
if
Feature
.
enabled?
(
:api_always_use_application_json
,
default_enabled: :yaml
)
content_type
'application/json'
else
content_type
'text/plain'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment