Swagger Json Schema Generator For Enum Key Value

Join GitHub today

  1. Swagger Json Schema Generator For Enum Key Value Calculator
  2. Json Schema Enum Example
  3. Swagger Json Schema Generator For Enum Key Value 1
  4. Json Schema Enum Description

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up

Additional type-specific keywords can be used to refine the data type, for example, limit the string length or specify an enum of possible values. Mixed Types type takes a single value. Type as a list is not valid in OpenAPI (even though it is valid in JSON Schema): # Incorrect type: - string - integer. Version 2.0 specification defines a set of files required to describe an API. These files can then be used by the Swagger-UI project and Swagger-Codegen. May 05, 2016 From a JSON Schema perspective, I would go with something like what @ralfhandl suggested, or the following (note that in later versions of JSON Schema there is a const keyword which makes this a lot more clear than single-value enum does). Feb 22, 2017  The specification says that enum may include null. If type does not also include null, although the validation check for the enum key word will pass, the validation check for the type key word will mean the instance fails overall validation. The inverse is also true. Usecase: I have a value which may be a number of strings, or null. Valid values are 'a', 'b', or NULL. How to define enum in swagger.io? Ask Question Asked 5 years, 2 months ago. Active today. Viewed 62k times 43. Does anyone was able to define possible 'enum' values in Model tab in swaggger version 2.0? Example here. Since I'm following same JSON schema as per this demo json.

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. /microsoft-project-2016-standard-retail-key-generator.html.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger Json Schema Generator For Enum Key Value Calculator

Labels

Comments

commented Jun 20, 2013

There is no way to specify a Map of key/value pairs to be displayed in the UI.

If the key is an enum, then all of the enum's values could be included as optional object properties.

If the key is a 'string', then maybe the word 'string' with a '..' on the following line (or maybe just 'MapKey').

The value object should be expanded as per the usual rules for a model's property type.

Thus type='Map[SomeEnum,SomeObject]' could be expanded as:
..
'SomeEnumVal1': { 'someObjectProperty': 'someObjectPropertyType' },
'SomeEnumVal2': { 'someObjectProperty': 'someObjectPropertyType' },
..

And type='Map[KeyObject,Array[SomeObject]]' could be expanded as:
'MapKey[KeyObject]': [ { 'someObjectProperty': 'someObjectPropertyType' } ]
..

Closed

Json Schema Enum Example

commented Apr 7, 2014

This discussion is moved to the swagger-spec repository as it first needs to be resolved in the swagger specification - OAI/OpenAPI-Specification#38.

Swagger Json Schema Generator For Enum Key Value 1

closed this Apr 7, 2014
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Swagger Json Schema Generator For Enum Key Value
swagger.json
{'swagger':'2.0','info':{'title':'Course Maps API','description':'API for interacting with Engrade Course Maps','contact':{'name':'Isaac Riceweber','email':'isaac.riceweber@engrade.com'},'version':'v1'},'host':'core-api-c2qastg.lms.nonprod.mheducation.com','basePath':'/coursemaps/v1','schemes':['https'],'consumes':['application/json'],'produces':['application/json'],'paths':{'/folders/{folderid}/children/{itemid}/assignment':{'post':{'tags':['folders'],'description':'Creates an assignment for an item and creates a mapping between the item and assignment','operationId':'assignFolderItem','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder requested.','required':true,'type':'integer','minimum':1},{'name':'itemid','in':'path','description':'Identifier for the item that will be assigned','required':true,'type':'integer','minimum':1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'$ref':'#/definitions/InstructionParameters'}}],'responses':{'200':{'description':'Item was successfully assigned','schema':{'properties':{'assignment':{'required':['assnid','clid'],'properties':{'assnid':{'description':'The assignment id of the newly created assignment','type':'string'},'clid':{'description':'The id of the class that owns this assignment','type':'string'}},'type':'object'},'item':{'$ref':'#/definitions/Item'}},'type':'object'}},'400':{'description':'Invalid input parameter','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'Not authorized to assign the item in the folder','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Item is not in the folder','schema':{'$ref':'#/definitions/Error'}},'409':{'description':'The item is already assigned','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'An error occurred with assigning the item','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]},'delete':{'tags':['folders'],'description':'Deletes an item from a folder','operationId':'unassignFolderItem','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder requested.','required':true,'type':'integer','minimum':1},{'name':'itemid','in':'path','description':'Identifier for the item that will be deleted','required':true,'type':'integer','minimum':1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'}],'responses':{'200':{'description':'Item was successfully assigned','schema':{'properties':{'assnid':{'description':'ID of assignment associated with item','type':'integer'},'clid':{'description':'ID of class assignment is in','type':'integer'},'itemid':{'description':'ID of item in a course map folder','type':'integer'},'folderid':{'description':'ID of folder item was contained in','type':'integer'}},'type':'object'}},'403':{'description':'Not authorized to delete the item in the folder','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Folder does not exist','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'An error occurred with deleting the item','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/bulk-copy/tasks':{'post':{'tags':['tasks'],'description':'Initiates bulk copy task.','operationId':'initBulkCopy','parameters':[{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'$ref':'#/definitions/BulkCopyParameters'}}],'responses':{'201':{'description':'Successfully copied','schema':{'properties':{'task':{'$ref':'#/definitions/BulkCopyParameters'}},'type':'object'}},'202':{'description':'Accepted, copy task is pending due to async-required and/or child tasks','schema':{'properties':{'task':{'$ref':'#/definitions/BulkCopyParameters'}},'type':'object'}},'400':{'description':'Bad request','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'Unauthorized','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Course does not exist','schema':{'$ref':'#/definitions/Error'}},'409':{'description':'Conflict','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Error occurred while copying the course','schema':{'$ref':'#/definitions/Error'}},'524':{'description':'Timeout error','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/bulk-copy/tasks/{taskxid}':{'put':{'tags':['tasks'],'description':'Creates copied course and associates copied items with it.','operationId':'copyCourses','parameters':[{'name':'taskxid','in':'path','description':'Identifier for the task requested.','required':true,'type':'string'},{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'$ref':'#/definitions/BulkCopyParameters'}}],'responses':{'200':{'description':'Successfully copied','schema':{'properties':{'task':{'$ref':'#/definitions/BulkCopyParameters'}},'type':'object'}},'400':{'description':'Bad request','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'Unauthorized','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Course does not exist','schema':{'$ref':'#/definitions/Error'}},'409':{'description':'Conflict','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Error occurred while copying the course','schema':{'$ref':'#/definitions/Error'}},'524':{'description':'Timeout error','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/':{'get':{'tags':['docs'],'description':'This document','operationId':'getSwaggerJson','responses':{'200':{'description':'This document'}}}},'/folders/{folderid}':{'get':{'tags':['folders'],'description':'Contents of a folder as a tree structure, limited by the depth parameter.','operationId':'getFolder','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder requested.','required':true,'type':'integer','minimum':1},{'name':'depth','in':'query','description':'Depth of the tree to fetch.','required':false,'type':'integer','minimum':-1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'}],'responses':{'200':{'description':'The folder, its contents, and subfolder contents.','schema':{'properties':{'folder':{'$ref':'#/definitions/Folder'}},'type':'object'}},'400':{'description':'Invalid input parameter','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'Not authorized to view the course containing this folder.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Folder does not exist','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]},'delete':{'tags':['folders'],'description':'Deletes a single folder','operationId':'deleteFolder','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder to delete.','required':true,'type':'string'}],'responses':{'200':{'description':'Folder was successfully deleted'},'400':{'description':'Attempted to delete an entire course. Deleting an entire course is currently not implemented.','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'Not authorized to delete the folder','schema':{'$ref':'#/definitions/Error'}},'409':{'description':'Assignments may not be in the deleted subtree','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Various server errors. See response payload for more information.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]},'patch':{'tags':['folders'],'description':'Update properties of a single folder, including the folder's children','operationId':'updateFolder','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder requested.','required':true,'type':'integer','minimum':1},{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'properties':{'title':{'description':'Plain text title for the folder','type':'string'},'titleHtml':{'description':'HTML title for the folder','type':'string'},'children':{'description':'List of ids that will become the children of the folder','type':'array','items':{'type':'integer'}},'presentationOrders':{'description':'JsonObject keyed with the name(s) of presentationorder(s), with the values being arrays of itemIds. A null value indicates the presentation order should be removed entirely.'},'parentId':{'description':'Id of the new parent for the folder','type':'string'},'weight':{'description':'Desired position of folder within new parent','type':'integer','minimum':0}},'type':'object'}}],'responses':{'200':{'description':'The updated folder','schema':{'properties':{'folder':{'$ref':'#/definitions/Folder'}},'type':'object'}},'400':{'description':'Invalid input parameter','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'Not authorized to edit the course containing this folder.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Folder does not exist','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/folders/{folderid}/children/{childid}':{'delete':{'tags':['folders'],'description':'Deletes an item from a folder','operationId':'deleteFolderItem','parameters':[{'name':'folderid','in':'path','description':'Identifier for the parent of the item to be deleted.','required':true,'type':'integer','minimum':1},{'name':'childid','in':'path','description':'Identifier for the item to be deleted.','required':true,'type':'integer','minimum':1}],'responses':{'200':{'description':'Folder item successfully deleted'},'403':{'description':'Not authorized to delete the contents in this folder','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Folder does not exist','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Error occurred while deleting the folder item','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]},'patch':{'tags':['items'],'description':'Update properties of a single item','operationId':'updateItem','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder requested.','required':true,'type':'string'},{'name':'childid','in':'path','description':'Identifier for the child item requested.','required':true,'type':'string'},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'properties':{'title':{'description':'Plain text title for the item','type':'string'},'includeInClassPresentation':{'description':'Flag indicating item should be included in an in-class presentation, if applicable.','type':'boolean'},'visibleToStudents':{'description':'Flag indicating item should be visible to student level users.','type':'boolean'},'parentId':{'description':'Id of new parent. This indicates the item is moving to a new folder.','type':'string'},'weight':{'description':'Desired position of folder within new parent','type':'integer','minimum':0}},'type':'object'}}],'responses':{'200':{'description':'The updated item','schema':{'properties':{'item':{'$ref':'#/definitions/Item'}},'type':'object'}},'400':{'description':'Invalid input parameter','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'User does not exist or is not logged in.','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'Not authorized to edit the course containing this item.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Item does not exist','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/courses/{courseid}':{'get':{'tags':['courses'],'description':'Fetch the entire tree of a course. A course is a folder with no parent.','operationId':'getCourse','parameters':[{'name':'courseid','in':'path','description':'Identifier for the course requested.','required':true,'type':'integer','minimum':1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'}],'responses':{'200':{'description':'The entire course tree.','schema':{'properties':{'course':{'$ref':'#/definitions/Folder'},'importStatus':{'description':'The status of the courseware import','type':'string','enum':['In-Progress','Error','Complete']}},'type':'object'}},'401':{'description':'You do not have access to the course.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'The course does not exist.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/courses/{courseid}/import-status':{'get':{'tags':['courses'],'summary':'Import Status Object Returned as part of the GET /courses/:id/import-status call','description':'Fetches the status of the importing process for a given course','operationId':'getImportStatus','parameters':[{'name':'courseid','in':'path','description':'Identifier for the course the status is requested.','required':true,'type':'integer','minimum':1}],'responses':{'200':{'description':'The status of the import.','schema':{'properties':{'importStatus':{'description':'Import Status Object Returned as part of the GET /courses/:id/import-status call','$ref':'#/definitions/ImportStatus'}},'type':'object'}},'403':{'description':'Rejected JWT claims','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'The course does not exist.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/folders/{folderid}/layout':{'get':{'tags':['folders'],'description':'Fetch the layout metadata for a folder if it exists','operationId':'getFolderLayout','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder.','required':true,'type':'integer','minimum':1}],'responses':{'200':{'description':'The folder layout','schema':{'properties':{'layout':{'$ref':'#/definitions/FolderLayout'}},'type':'object'}},'401':{'description':'You do not have access to the course containing the folder.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'The folder does not exist, or a layout definition for the folder does not exist.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/folders':{'post':{'tags':['folders'],'description':'Add a folder.','operationId':'addFolder','parameters':[{'name':'payload','in':'body','description':'Structure for JSON request payload','required':true,'schema':{'required':['parentId'],'properties':{'parentId':{'description':'Parent Id of the folder','type':'integer'},'name':{'description':'Name (title) of folder','type':'string','default':'New Folder'}}}}],'responses':{'200':{'description':'The folder that was added.','schema':{'properties':{'folder':{'$ref':'#/definitions/Folder'}},'type':'object'}},'403':{'description':'Not authorized','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Parent folder does not exist','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Error occurred while adding the folder item','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/folders/{folderid}/children':{'post':{'tags':['folders'],'description':'Add a child to a folder. Current version supports adding a file upload.','operationId':'addFolderChild','consumes':['multipart/form-data'],'parameters':[{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'itemType','in':'formData','description':'Asset Type being added','required':true,'type':'string'},{'name':'folderid','in':'path','description':'Identifier for the folder that the item will be added to.','required':true,'type':'string'},{'name':'isCustomContent','in':'formData','description':'File to upload','required':false,'type':'file'},{'name':'title','in':'formData','description':'Title of item','required':false,'type':'string'},{'name':'url','in':'formData','description':'Item URL','required':false,'type':'string'},{'name':'sourceId','in':'formData','description':'Source ID for the lars item type','required':false,'type':'string'},{'name':'weight','in':'formData','description':'Folder child index where file should be inserted','required':false,'type':'integer'}],'responses':{'200':{'description':'The file that was added.','schema':{'properties':{'item':{'$ref':'#/definitions/LaunchableItem'}},'type':'object'}},'400':{'description':'File upload not provided in request','schema':{'$ref':'#/definitions/Error'}},'401':{'description':'User does not exist or is not logged in.','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'Not authorized to add the item to the folder.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'Item uploaded was not found when attempting to add it to the folder','schema':{'$ref':'#/definitions/Error'}},'422':{'description':'Item uploaded had incorrect parameters for creation','schema':{'$ref':'#/definitions/Error'}},'500':{'description':'Unable to find folder or item authorization, failure to upload file, or database insertion failure.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/items/content':{'post':{'tags':['items'],'description':'A key value pair where key is the s3 url and the value is the content of the s3 url','operationId':'itemContent','parameters':[{'name':'urls','in':'body','description':'s3 URLs to resolve','required':true,'schema':{'type':'array','items':{'type':'string'}}}],'responses':{'200':{'description':'Map of s3 urls => resolved content','schema':{'type':'object','additionalProperties':{'type':'string'}}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/user/policy':{'get':{'tags':['user'],'description':'Returns map of string to boolean depending on user. Names provided depend on version requested [See #/definitions/PolicyV(1 2)]','operationId':'getPolicy','produces':['application/json'],'parameters':[{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'v','in':'query','description':'version of user policy desired','type':'integer'}],'responses':{'200':{'description':'User policy','schema':{'properties':{'policy':{'description':'The user policy requested','$ref':'#/definitions/ToggleSet'}},'type':'object'}},'501':{'description':'Policy not implemented for profile','schema':{'$ref':'#/definitions/Error'}}},'security':[{'jwt':[]}]}},'/folders/{folderid}/schedule':{'post':{'tags':['folders','calendars'],'description':'Add an item to the calendar','operationId':'scheduleFolder','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder to be added to the calendar.','required':true,'type':'integer','minimum':1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'payload','in':'body','schema':{'$ref':'#/definitions/DateRange'}}],'responses':{'200':{'description':'The folder was added to the calendar.','schema':{'properties':{'schedule':{'$ref':'#/definitions/DateRange'}},'type':'object'}},'400':{'description':'Invalid context type or date inputs.','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'You do not have access to the context.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'The folder or item does not exist.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}},'/folders/{folderid}/children/{childid}/schedule':{'post':{'tags':['folders','items','calendars'],'description':'Add an item to the calendar','operationId':'scheduleItem','parameters':[{'name':'folderid','in':'path','description':'Identifier for the folder containing the item.','required':true,'type':'integer','minimum':1},{'name':'childid','in':'path','description':'Identifier for the item to be added to the calendar.','required':true,'type':'integer','minimum':1},{'$ref':'#/parameters/ContextType'},{'$ref':'#/parameters/ContextId'},{'name':'payload','in':'body','schema':{'$ref':'#/definitions/DateRange'}}],'responses':{'200':{'description':'The item was added to the calendar.','schema':{'properties':{'schedule':{'$ref':'#/definitions/DateRange'}},'type':'object'}},'400':{'description':'Invalid context type, date inputs, or item type.','schema':{'$ref':'#/definitions/Error'}},'403':{'description':'You do not have access to the context.','schema':{'$ref':'#/definitions/Error'}},'404':{'description':'The folder or item does not exist.','schema':{'$ref':'#/definitions/Error'}},'default':{'$ref':'#/responses/Error'}},'security':[{'jwt':[]}]}}},'definitions':{'AssessmentParameters':{'description':'Parameters to create assessment type assignments','allOf':[{'$ref':'#/definitions/AssignmentParameters'},{'required':['title','start','due'],'properties':{'title':{'description':'Title of the assignment','type':'string'},'start':{'description':'The start date of the assignment','type':'integer'},'due':{'description':'The due date of the assignment','type':'integer'},'category':{'description':'Assignment category','type':'integer'}},'type':'object'}]},'Assignment':{'description':'An object that references an assignment and its associated launchable item','allOf':[{'required':['startDate','dueDate','name','description','url'],'properties':{'startDate':{'description':'Start date','type':'string','format':'date-time'},'dueDate':{'description':'Due date','type':'string','format':'date-time'},'name':{'description':'Assignment name','type':'string'},'description':{'description':'Assignment description','type':'string'},'url':{'description':'URL','type':'string'},'resultUrl':{'description':'Result URL','type':'string'}},'type':'object'}]},'InstructionParameters':{'description':'Parameters to create an instruction type assignments','allOf':[{'$ref':'#/definitions/AssignmentParameters'},{'required':['title','points','start','due'],'properties':{'title':{'description':'Title of the assignment','type':'string'},'points':{'description':'Amount of points the assignment is out of','type':'string'},'start':{'description':'The start date of the assignment','type':'integer'},'due':{'description':'The due date of the assignment','type':'integer'},'description':{'description':'Assignment description','type':'string'},'category':{'description':'Assignment category','type':'integer'}},'type':'object'}]},'AssignmentParameters':{'required':['itemid','clid'],'properties':{'itemid':{'description':'Item ID','type':'integer'},'clid':{'description':'ID of the class that the item should be assigned to','type':'integer'}}},'BulkCopyParameters':{'description':'Data object class that stores parameters needed for the bulk copy controller','required':['provider_xid','job_xid','subject_xid','task_status','copy_items','primary_instructor','secondary_instructors','source_section_xid','dest_section_xid','date_offset','callback_url'],'properties':{'xid':{'description':'Client generated xid to track the copy task','type':'string'},'provider_xid':{'description':'Provider xid - only requires {system}:{service}:{partition}','type':'string'},'parent_task_xid':{'description':'Omitted if empty. Populated when task has a parent task','type':'string'},'job_xid':{'description':'Client generated xid to track the containing job','type':'string'},'subject_xid':{'description':'Subject (typically instructor or admin) who initiated the copy request','type':'string'},'task_status':{'description':'Provides status for jobs and tasks','required':['status_code','msg'],'properties':{'status_code':{'description':'Status code','type':'string','enum':['requested','pending','pending_child_tasks','completed','completed_with_errors','cancelled','failed']},'msg':{'description':'Informational content','type':'string'},'occurred_datetime':{'description':'Datetime of this task status','type':'string'}},'type':'object'},'error':{'properties':{'source_xid':{'type':'string'},'trace':{'description':'Data used by the Course Management API to conduct diagnostics and troubleshooting of the task','type':'string'},'severity':{'type':'string','default':'error','enum':['critical','error','warning']},'msg':{'type':'string'}},'type':'object'},'copy_items':{'description':'List of copyable items (i.e. assignment) owned by a provider','type':'array','items':{'properties':{'copy_item':{'description':'A single copyable item (i.e. assignment) owned by a provider','properties':{'source_item':{'description':'Source entity to-be-copied from','properties':{'xid':{'description':'{system}:{service}:{partition}:{entity}:{id}:[{version}]','type':'string'},'payload':{'description':'parameter (context) specific to entity to support copy','type':'object'}},'type':'object'},'dest_item':{'description':'Copied destination entity (i.e. individual assignment)','properties':{'xid':{'description':'{system}:{service}:{partition}:{entity}:{id}:[{version}]','type':'string'}},'type':'object'},'error':{'properties':{'source_xid':{'type':'string'},'trace':{'description':'Data used by the Course Management API to conduct diagnostics and troubleshooting','type':'string'},'severity':{'type':'string','default':'error','enum':['critical','error','warning']},'msg':{'type':'string'}},'type':'object'}},'type':'object'}}}},'primary_instructor':{'properties':{'instructor_xid':{'type':'string'},'role':{'type':'string'}},'type':'object'},'secondary_instructors':{'type':'array','items':{'properties':{'instructor':{'properties':{'instructor_xid':{'type':'string'},'role':{'type':'string'}},'type':'object'}}}},'source_section_xid':{'description':'Xid of the section being copied','type':'string'},'dest_section_xid':{'description':'Xid of the section being copied to','type':'string'},'date_offset':{'description':'ISO8601 duration-only interval format. Provides the actual offset value set by the user.','type':'string'},'start_datetime':{'description':'Datetime representation of the task start time','type':'string'},'end_datetime':{'description':'Datetime representation of the task end time','type':'string'},'callback_url':{'description':'Url of the course management task represented by the task xid','type':'string'},'child_tasks':{'type':'array','items':{'$ref':'#/definitions/BulkCopyParameters'}}},'type':'object'},'Entity':{'required':['type','title','id'],'properties':{'type':{'description':'The type of child. Value must be the Swagger definition name implementing this interface.','type':'string'},'title':{'description':'User facing title of the item/folder','type':'string'},'id':{'description':'Primary identifier of the item/folder','type':'string'},'visibleToStudents':{'description':'Flag indicating if the item is visible to students','type':'boolean'},'schedule':{'description':'Range of dates associated with this entity','$ref':'#/definitions/DateRange'},'coursewareId':{'description':'Item id in published courseware used to create this course.','type':'string'},'isUserAddedContent':{'description':'Flag indicating if the entity was added by a customer (Teacher/Admin).','type':'boolean'}},'discriminator':'type'},'Folder':{'type':'object','allOf':[{'$ref':'#/definitions/Entity'},{'required':['children'],'properties':{'type':{'type':'string','enum':['Folder']},'children':{'type':'array','items':{'$ref':'#/definitions/Entity'}},'coursewareId':{'description':'The ID of the respective MHE courseware for the folder','type':'string'},'publishId':{'description':'Publish Id for folder','type':'string'},'titleHtml':{'description':'The title of the folder styled with HTML','type':'string'},'presentationOrders':{'description':'List of presentation orders where key is the name and value is a list of ints','type':'object','$ref':'#/definitions/PresentationOrders'},'instructorNotes':{'description':'Instructor notes for the folder','type':'string'},'mheMetadataUrl':{'description':'Url pointing to MHE metadata for item','type':'string'},'schedule':{'description':'Dates associated with the folder on the class calendar','type':'object','$ref':'#/definitions/DateRange'},'isAddOn':{'description':'Boolean that is true if the folder is an addon folder','type':'boolean'}},'type':'object'}]},'ImportStatus':{'required':['id','issues','status'],'properties':{'id':{'description':'The primary id for imports','type':'integer','format':'int64'},'message':{'description':'User facing current message of the import process.','type':'string'},'progress':{'description':'Object containing the current count and the total import step to facilitate progress indicators','properties':{'count':{'description':'Current step of the import','type':'integer'},'total':{'description':'Total number of import steps/items.','type':'integer'}},'type':'object'},'issues':{'description':'List of issues encountered during the import process.'},'status':{'description':'Status indicator of the import','type':'string','enum':['In-Progress','Error','Complete']}},'discriminator':'type'},'FolderLayout':{'properties':{'sections':{'description':'List of content sections','type':'array','items':{'$ref':'#/definitions/FolderLayoutSection'}},'backgroundImage':{'description':'Optional url to a background image','type':'string'}}},'FolderLayoutRow':{'properties':{'content':{'description':'List of item ids','type':'array','items':{'type':'string'}},'columnWeights':{'description':'Count of elements is the number of columns. Each value is the relative width of each column.','type':'array','items':{'type':'integer'}}}},'FolderLayoutSection':{'required':['rows'],'properties':{'title':{'type':'string'},'backgroundImage':{'type':'string'},'rows':{'type':'array','items':{'$ref':'#/definitions/FolderLayoutRow'}}}},'PresentationOrders':{'type':'object','additionalProperties':{'type':'array','items':{'type':'string'}}},'Item':{'allOf':[{'$ref':'#/definitions/Entity'},{'properties':{'iconUrl':{'description':'Url pointing to the applicable icon.','type':'string'},'thumbnailUrl':{'description':'Url pointing a thumbnail of the resource.','type':'string'},'coursewareAssetId':{'description':'CDS Courseware Asset Id for item','type':'string'},'includeInClassPresentation':{'description':'Flag indicating item should be included in an in-class presentation, if applicable.','type':'boolean'},'tags':{'description':'List of tags associated with item','type':'array','items':{'$ref':'#/definitions/ItemTag'},'uniqueItems':true},'instructorNotes':{'description':'Instructor notes for item','type':'string'},'mheMetadataUrl':{'description':'Url pointing to MHE metadata for item','type':'string'},'audience':{'description':'List of IMS Role values. If missing or empty, item is meant for all roles.','type':'array','items':{'$ref':'#/definitions/UserRole'},'uniqueItems':true}},'type':'object'}]},'ItemTag':{'type':'string','enum':['Leveled']},'InlineImage':{'allOf':[{'$ref':'#/definitions/Item'},{'properties':{'url':{'description':'Url pointing to the image that should be displayed inline.','type':'string'}},'type':'object'}]},'InlineText':{'allOf':[{'$ref':'#/definitions/Item'},{'properties':{'url':{'description':'URL to an S3 location that contains the inline text (HTML) data','type':'string'}},'type':'object'}]},'LaunchableItem':{'description':'An item that references an internal or external resource','allOf':[{'$ref':'#/definitions/Item'},{'required':['url','resourceType','quizId'],'properties':{'url':{'description':'Fully qualified url pointing to the resource.','type':'string'},'resourceType':{'description':'Identifier of the type of resource launched with the url.','type':'string'},'assignment':{'description':'Assignment associated with the launchable item','$ref':'#/definitions/Assignment'},'quizId':{'description':'Engrade quiz id associated with item. This will be the empty string if no such id exists.','type':'string'}},'type':'object'}]},'ToggleSetV1':{'properties':{'ADD_GOOGLE_DRIVE_CONTENT':{'type':'boolean'},'ADD_OWN_CONTENT':{'type':'boolean'},'ADD_TO_CALENDAR_FROM_HIERARCHY':{'type':'boolean'},'ASSIGN':{'type':'boolean'},'EDIT_MODE_FOR_HIERARCHY':{'type':'boolean'},'EXTEND_LICENSE':{'type':'boolean'},'HIERARCHY_WITH_ASSETS':{'type':'boolean'},'HIERARCHY_WITH_FOLDERS':{'type':'boolean'},'HIERARCHY_FILTER':{'type':'boolean'},'LAUNCH_ASSET_FROM_HIERARCHY':{'type':'boolean'},'LAUNCH_FOLDER_FROM_HIERARCHY':{'type':'boolean'},'PLAYER_AS_INDIVIDUAL_ASSET':{'type':'boolean'},'PLAYER_AS_SEQUENCE':{'type':'boolean'},'REARRANGE_PRESENTATION_ORDER_FROM_TRAY':{'type':'boolean'},'SEARCH':{'type':'boolean'}},'type':'object'},'ToggleSetV2':{'properties':{'ADD_TO_CALENDAR_FROM_HIERARCHY':{'type':'boolean'},'ASSIGN':{'type':'boolean'},'CAN_EDIT_COURSE':{'type':'boolean'},'CAN_SEE_TEACHER_MATERIALS':{'type':'boolean'},'HIERARCHY_WITH_ASSETS':{'type':'boolean'},'HIERARCHY_WITH_FOLDERS':{'type':'boolean'},'K5_EXPERIENCE':{'type':'boolean'},'LAUNCH_FOLDER_FROM_HIERARCHY':{'type':'boolean'},'PLAYER_AS_SEQUENCE':{'type':'boolean'},'REARRANGE_PRESENTATION_ORDER_FROM_TRAY':{'type':'boolean'},'SEARCH':{'type':'boolean'}},'type':'object'},'ToggleSetV3':{'properties':{'ADD_TO_CALENDAR_FROM_HIERARCHY':{'type':'boolean'},'ASSIGN':{'type':'boolean'},'CAN_EDIT_COURSE':{'type':'boolean'},'CAN_SEE_TEACHER_MATERIALS':{'type':'boolean'},'HIDE_SEARCH_STANDARDS':{'type':'boolean'},'HIERARCHY_WITH_ASSETS':{'type':'boolean'},'HIERARCHY_WITH_FOLDERS':{'type':'boolean'},'K5_EXPERIENCE':{'type':'boolean'},'LAUNCH_FOLDER_FROM_HIERARCHY':{'type':'boolean'},'PLAYER_AS_SEQUENCE':{'type':'boolean'},'REARRANGE_PRESENTATION_ORDER_FROM_TRAY':{'type':'boolean'},'SEARCH':{'type':'boolean'},'USE_CALENDAR_API':{'type':'boolean'}},'type':'object'},'ToggleSet':{'description':'Map of toggle name to value. List of names depends on user policy version requested.','type':'object','additionalProperties':{'type':'boolean'}},'Error':{'required':['error'],'properties':{'error':{'type':'string'}},'type':'object'},'DateRange':{'required':['start','end'],'properties':{'start':{'type':'string','format':'date-time'},'end':{'type':'string','format':'date-time'}},'type':'object'},'UserRole':{'type':'string','enum':['Learner','Instructor','Mentor']}},'parameters':{'ContextType':{'name':'contexttype','in':'query','description':'Type of the context.','required':true,'type':'string','enum':['user','class','school','district']},'ContextId':{'name':'contextid','in':'query','description':'The id of the context.','required':true,'type':'string'}},'responses':{'Error':{'description':'An error occurred while processing the request.','schema':{'$ref':'#/definitions/Error'}}},'securityDefinitions':{'jwt':{'type':'apiKey','description':'Must be in the form 'Bearer <JWT>' where <JWT> is the Json Web Token obtained from Engrade','name':'Authorization','in':'header'}}}

Json Schema Enum Description

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment