Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
S
sshoc-marketplace-backend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SSHOC
  • sshoc-marketplace-backend
  • Issues
  • #40

Closed
Open
Opened Nov 18, 2020 by serviceAcc.5d4bd64a607a0@stefan.probstMaintainer

clarify validation for non-concept property values

properties can be either vocabulary-backend concepts, or free-form values. for the latter, the property type defines a type, which can be string|date|int|float|url. however, according to both the openapi docs, and the actual values returned from the api, all values are cast to strings, and no serverside validation seems to happen for these values.

for example, the year property type is an int: curl http://localhost:8080/api/property-types/year returns:

{"code":"year","label":"Year","type":"int","ord":23,"allowedVocabularies":[]}

however, submitting an entity with a non-integer year property is totally possible.

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ..." -d '{"label":"Label","description":"","properties":[{"type": {"code": "year"},"value":"one two"}]}' http://localhost:8080/api/datasets | jq

similarly, for e.g. media properties, which should be urls, but accept any value.

Edited Nov 18, 2020 by serviceAcc.5d4bd64a607a0
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: sshoc/sshoc-marketplace-backend#40