Commit 97dd1f65 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '208289-modify-regex-for-releases-api-filepath' into 'master'

Modify regex for Releases API filepath

See merge request gitlab-org/gitlab!37207
parents d61e468f 045a0e3e
......@@ -6,7 +6,7 @@ module Releases
belongs_to :release
FILEPATH_REGEX = /\A\/([\-\.\w]+\/?)*[\da-zA-Z]+\z/.freeze
FILEPATH_REGEX = %r{\A/(?:[\-\.\w]+/?)*[\da-zA-Z]+\z}.freeze
validates :url, presence: true, addressable_url: { schemes: %w(http https ftp) }, uniqueness: { scope: :release }
validates :name, presence: true, uniqueness: { scope: :release }
......
......@@ -4,7 +4,6 @@
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"filepath": { "type": "string" },
"url": { "type": "string" },
"direct_asset_url": { "type": "string" },
"external": { "type": "boolean" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment