Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
d8cabda6
Commit
d8cabda6
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-272
: allow anyone to view our schema's
parent
122b16a6
No related branches found
No related tags found
1 merge request
!213
Resolve TMSS-272
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/src/tmss/tmssapp/views.py
+5
-1
5 additions, 1 deletion
SAS/TMSS/src/tmss/tmssapp/views.py
with
5 additions
and
1 deletion
SAS/TMSS/src/tmss/tmssapp/views.py
+
5
−
1
View file @
d8cabda6
...
@@ -6,6 +6,8 @@ from lofar.sas.tmss.tmss.tmssapp import models
...
@@ -6,6 +6,8 @@ from lofar.sas.tmss.tmss.tmssapp import models
from
lofar.sas.tmss.tmss.tmssapp.validation
import
get_default_json_object_for_schema
from
lofar.sas.tmss.tmss.tmssapp.validation
import
get_default_json_object_for_schema
from
lofar.sas.tmss.tmss.tmssapp.adapters.parset
import
convert_to_parset
from
lofar.sas.tmss.tmss.tmssapp.adapters.parset
import
convert_to_parset
from
drf_yasg.utils
import
swagger_auto_schema
from
drf_yasg.utils
import
swagger_auto_schema
from
rest_framework.permissions
import
AllowAny
from
rest_framework.decorators
import
authentication_classes
,
permission_classes
def
subtask_template_default_specification
(
request
,
subtask_template_pk
:
int
):
def
subtask_template_default_specification
(
request
,
subtask_template_pk
:
int
):
...
@@ -33,8 +35,10 @@ def task_specify_observation(request, pk=None):
...
@@ -33,8 +35,10 @@ def task_specify_observation(request, pk=None):
task
=
get_object_or_404
(
models
.
TaskDraft
,
pk
=
pk
)
task
=
get_object_or_404
(
models
.
TaskDraft
,
pk
=
pk
)
return
HttpResponse
(
"
response
"
,
content_type
=
'
text/plain
'
)
return
HttpResponse
(
"
response
"
,
content_type
=
'
text/plain
'
)
@permission_classes
([
AllowAny
])
@authentication_classes
([
AllowAny
])
@swagger_auto_schema
(
responses
=
{
200
:
'
JSON schema
'
,
@swagger_auto_schema
(
responses
=
{
200
:
'
JSON schema
'
,
40
3
:
'
forbidden
'
},
40
4
:
'
the schema with requested <name> and <version> is not available
'
},
operation_description
=
"
Get the JSON schema with the given <name> and <version> as application/json content response.
"
)
operation_description
=
"
Get the JSON schema with the given <name> and <version> as application/json content response.
"
)
def
get_common_json_schema
(
request
,
name
:
str
,
version
:
str
):
def
get_common_json_schema
(
request
,
name
:
str
,
version
:
str
):
template
=
get_object_or_404
(
models
.
CommonSchemaTemplate
,
name
=
name
,
version
=
version
)
template
=
get_object_or_404
(
models
.
CommonSchemaTemplate
,
name
=
name
,
version
=
version
)
...
...
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