Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
19fd2d9f
Commit
19fd2d9f
authored
4 years ago
by
esikkala
Browse files
Options
Downloads
Patches
Plain Diff
Update CSV API parameters
parent
5f84f06f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/server/index.js
+11
-1
11 additions, 1 deletion
src/server/index.js
src/server/openapi.yaml
+29
-0
29 additions, 0 deletions
src/server/openapi.yaml
with
40 additions
and
1 deletion
src/server/index.js
+
11
−
1
View file @
19fd2d9f
...
...
@@ -119,7 +119,7 @@ new OpenApiValidator({
backendSearchConfig
,
resultClass
:
req
.
params
.
resultClass
,
facetClass
:
req
.
query
.
facetClass
||
null
,
constraints
:
req
.
query
.
constraints
==
null
?
null
:
JSON
.
parse
(
req
.
query
.
constraints
)
,
constraints
:
req
.
query
.
constraints
==
null
?
null
:
req
.
query
.
constraints
,
resultFormat
:
resultFormat
})
if
(
resultFormat
===
'
csv
'
)
{
...
...
@@ -261,6 +261,16 @@ new OpenApiValidator({
}
})
/* Some example paths for serving individual files: */
// app.get('/robots.txt', (request, response) => {
// response.sendFile(path.join(publicPath, 'robots.txt'))
// })
// app.get('/sitemap.xml', (request, response) => {
// response.sendFile(path.join(publicPath, 'sitemap.xml'))
// })
// Express server is used to serve the React app only in production
if
(
!
isDevelopment
)
{
/* Routes are matched to a url in order of their definition
...
...
This diff is collapsed.
Click to expand it.
src/server/openapi.yaml
+
29
−
0
View file @
19fd2d9f
...
...
@@ -120,6 +120,35 @@ paths:
type
:
object
get
:
summary
:
Return all search results as a CSV file
parameters
:
-
in
:
path
name
:
resultClass
schema
:
type
:
string
example
:
perspective1
required
:
true
description
:
The class of the results
-
in
:
query
name
:
facetClass
schema
:
type
:
string
example
:
perspective1
required
:
true
description
:
The class for facet configs
-
in
:
query
name
:
constraints
required
:
false
content
:
application/json
:
schema
:
type
:
array
-
in
:
query
name
:
resultFormat
schema
:
type
:
string
example
:
csv
required
:
true
description
:
Result format, only support for CSV for now.
responses
:
'
200'
:
description
:
All search results as a CSV file
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment