Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-650

Correct securityDefinitions Object In OpenAPI Spec

    XMLWordPrintable

    Details

      Description

      According to the OpenAPI spec, the Security Definitions Object needs to be an object with nested Security Scheme Objects. Right now, we have the following top-level object:

      {
        swagger: "2.0",
        // stuff that probably isn't relevant
        securityDefinitions: {
          type: "basic",
          description: "HTTP basic access authentication using OpenMRS username and password"
        },
        // stuff that probably isn't relevant
      }
      

      We need to change this to:

      {
        swagger: "2.0",
        // stuff that probably isn't relevant
        securityDefinitions: {
          basic_auth: {
            type: "basic",
            description: "HTTP basic access authentication using OpenMRS username and password"
          }
        },
        // stuff that probably isn't relevant
      }
      

      Previous description

      This error occurs when trying to log in. Reproduce as follows:

      $ npm install openmrs.js
      $ node
      > OpenMRS = require('openmrs.js')
      > o = new OpenMRS()
      > o.login('admin', 'Admin123', 'https://demo.openmrs.org/openmrs')
      

      Talk Reference
      GitHub issue created by @willa

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              pascal Pascal Brandt
              Reporter:
              pascal Pascal Brandt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: