Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1105

Swagger generates invalid Open API Specification file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.4.0
    • SDK
    • None

    Description

      The Open API Specification file produced by Swagger Gradle Plugin is invalid.

      1. Run ./gradlew build
      2. Use the contents of the generated Open API Spec file build/classes/java/main/static/swagger-ui/fineract.yaml to debug/validate spec file from here: https://validator.swagger.io/  - Use Debug POST request to validate 

      The validator returns the following:

      ---
      messages: - "attribute paths.'/glclosures'(get).responses.200.description is missing"
      - "attribute paths.'/glclosures'(post).responses.200.description is missing"
      - "attribute paths.'/glclosures/{glClosureId}'(get).responses.200.description is missing"
      - "attribute paths.'/glclosures/{glClosureId}'(put).responses.200.description is missing"
      - "attribute paths.'/glclosures/{glClosureId}'(delete).responses.200.description is\
        \ missing"
      - "attribute paths.'/financialactivityaccounts'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/financialactivityaccounts'(post).responses.200.description is\
        \ missing"
      - "attribute paths.'/financialactivityaccounts/{mappingId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/financialactivityaccounts/{mappingId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/glaccounts/template'(get).responses.200.description is missing"
      - "attribute paths.'/glaccounts'(get).responses.200.description is missing"
      - "attribute paths.'/glaccounts'(post).responses.200.description is missing"
      - "attribute paths.'/glaccounts/{glAccountId}'(get).responses.200.description is missing"
      - "attribute paths.'/glaccounts/{glAccountId}'(put).responses.200.description is missing"
      - "attribute paths.'/glaccounts/{glAccountId}'(delete).responses.200.description is\
        \ missing"
      - "attribute paths.'/journalentries/{transactionId}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/journalentries/{journalEntryId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/journalentries'(get).responses.200.description is missing"
      - "attribute paths.'/journalentries'(post).responses.200.description is missing"
      - "attribute paths.'/provisioningentries'(get).responses.200.description is missing"
      - "attribute paths.'/provisioningentries'(post).responses.200.description is missing"
      - "attribute paths.'/provisioningentries/entries'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/provisioningentries/{entryId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/provisioningentries/{entryId}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountingrules'(get).responses.200.description is missing"
      - "attribute paths.'/accountingrules'(post).responses.200.description is missing"
      - "attribute paths.'/accountingrules/{accountingRuleId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountingrules/{accountingRuleId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountingrules/{accountingRuleId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountingrules/template'(get).responses.200.description is missing"
      - "attribute paths.'/audits/searchtemplate'(get).responses.200.description is missing"
      - "attribute paths.'/audits'(get).responses.200.description is missing"
      - "attribute paths.'/audits/{auditId}'(get).responses.200.description is missing"
      - "attribute paths.'/makercheckers/searchtemplate'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/makercheckers/{auditId}'(post).responses.200.description is missing"
      - "attribute paths.'/makercheckers/{auditId}'(delete).responses.200.description is\
        \ missing"
      - "attribute paths.'/makercheckers'(get).responses.200.description is missing"
      - "attribute paths.'/accountnumberformats'(get).responses.200.description is missing"
      - "attribute paths.'/accountnumberformats'(post).responses.200.description is missing"
      - "attribute paths.'/accountnumberformats/template'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountnumberformats/{accountNumberFormatId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountnumberformats/{accountNumberFormatId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/accountnumberformats/{accountNumberFormatId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/caches'(get).responses.200.description is missing"
      - "attribute paths.'/caches'(put).responses.200.description is missing"
      - "attribute paths.'/smscampaigns/template'(get).responses.200.description is missing"
      - "attribute paths.'/smscampaigns/{campaignId}'(put).responses.200.description is\
        \ missing"
      - "attribute paths.'/smscampaigns/{campaignId}'(post).responses.200.description is\
        \ missing"
      - "attribute paths.'/smscampaigns/{campaignId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/smscampaigns/{resourceId}'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/smscampaigns'(get).responses.200.description is missing"
      - "attribute paths.'/smscampaigns'(post).responses.200.description is missing"
      - "attribute paths.'/codes/{codeId}/codevalues'(post).responses.200.description is\
        \ missing"
      - "attribute paths.'/codes/{codeId}/codevalues/{codeValueId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/codes/{codeId}/codevalues/{codeValueId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/codes/{codeId}/codevalues/{codeValueId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/codes/{codeId}'(get).responses.200.description is missing"
      - "attribute paths.'/codes/{codeId}'(put).responses.200.description is missing"
      - "attribute paths.'/codes/{codeId}'(delete).responses.200.description is missing"
      - "attribute paths.'/codes'(get).responses.200.description is missing"
      - "attribute paths.'/codes'(post).responses.200.description is missing"
      - "attribute paths.'/externalservice/{servicename}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/configurations/{configId}'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/configurations/{configId}'(put).responses.200.description is\
        \ missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}/{datatableId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}/{apptableId}/{datatableId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/deregister/{datatable}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables'(get).responses.200.description is missing"
      - "attribute paths.'/datatables'(post).responses.200.description is missing"
      - "attribute paths.'/datatables/{datatableName}'(put).responses.200.description is\
        \ missing"
      - "attribute paths.'/datatables/{datatableName}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/register/{datatable}/{apptable}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/datatables/{datatable}'(get).responses.200.description is missing"
      - "attribute paths.'/entityDatatableChecks'(get).responses.200.description is missing"
      - "attribute paths.'/entityDatatableChecks'(post).responses.200.description is missing"
      - "attribute paths.'/entityDatatableChecks/template'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/entityDatatableChecks/{entityDatatableCheckId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/reports/template'(get).responses.200.description is missing"
      - "attribute paths.'/reports'(get).responses.200.description is missing"
      - "attribute paths.'/reports'(post).responses.200.description is missing"
      - "attribute paths.'/reports/{id}'(get).responses.200.description is missing"
      - "attribute paths.'/reports/{id}'(put).responses.200.description is missing"
      - "attribute paths.'/reports/{id}'(delete).responses.200.description is missing"
      - "attribute paths.'/runreports/{reportName}'(get).responses.200.description is missing"
      - "attribute paths.'/{entityType}/{entityId}/documents'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/{entityType}/{entityId}/documents/{documentId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/{entityType}/{entityId}/documents/{documentId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/hooks/template'(get).responses.200.description is missing"
      - "attribute paths.'/hooks/{hookId}'(get).responses.200.description is missing"
      - "attribute paths.'/hooks/{hookId}'(put).responses.200.description is missing"
      - "attribute paths.'/hooks/{hookId}'(delete).responses.200.description is missing"
      - "attribute paths.'/hooks'(get).responses.200.description is missing"
      - "attribute paths.'/hooks'(post).responses.200.description is missing"
      - "attribute paths.'/scheduler'(get).responses.200.description is missing"
      - "attribute paths.'/jobs'(get).responses.200.description is missing"
      - "attribute paths.'/jobs/{jobId}'(get).responses.200.description is missing"
      - "attribute paths.'/jobs/{jobId}/runhistory'(get).responses.200.description is missing"
      - "attribute paths.'/reportmailingjobs'(get).responses.200.description is missing"
      - "attribute paths.'/reportmailingjobs'(post).responses.200.description is missing"
      - "attribute paths.'/reportmailingjobs/{entityId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/reportmailingjobs/{entityId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/reportmailingjobs/{entityId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/reportmailingjobs/template'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/reportmailingjobrunhistory'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/authentication'(post).responses.200.description is missing"
      - "attribute paths.'/userdetails'(get).responses.200.description is missing"
      - "attribute paths.'/survey/{surveyName}/{apptableId}'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/survey/{surveyName}'(get).responses.200.description is missing"
      - "attribute paths.'/survey'(get).responses.200.description is missing"
      - "attribute paths.'/holidays'(get).responses.200.description is missing"
      - "attribute paths.'/holidays'(post).responses.200.description is missing"
      - "attribute paths.'/holidays/{holidayId}'(get).responses.200.description is missing"
      - "attribute paths.'/holidays/{holidayId}'(put).responses.200.description is missing"
      - "attribute paths.'/holidays/{holidayId}'(post).responses.200.description is missing"
      - "attribute paths.'/holidays/{holidayId}'(delete).responses.200.description is missing"
      - "attribute paths.'/currencies'(get).responses.200.description is missing"
      - "attribute paths.'/currencies'(put).responses.200.description is missing"
      - "attribute paths.'/offices/template'(get).responses.200.description is missing"
      - "attribute paths.'/offices/{officeId}'(get).responses.200.description is missing"
      - "attribute paths.'/offices/{officeId}'(put).responses.200.description is missing"
      - "attribute paths.'/offices'(get).responses.200.description is missing"
      - "attribute paths.'/offices'(post).responses.200.description is missing"
      - "attribute paths.'/provisioningcriteria/{criteriaId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/provisioningcriteria/{criteriaId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/provisioningcriteria/{criteriaId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/provisioningcriteria'(get).responses.200.description is missing"
      - "attribute paths.'/provisioningcriteria'(post).responses.200.description is missing"
      - "attribute paths.'/staff'(post).responses.200.description is missing"
      - "attribute paths.'/staff/{staffId}'(get).responses.200.description is missing"
      - "attribute paths.'/staff/{staffId}'(put).responses.200.description is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}/transactions'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}/transactions/template'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}/settle'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}/allocate'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}'(get).responses.200.description is missing"
      - "attribute paths.'/tellers/{tellerId}'(put).responses.200.description is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}'(put).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/{cashierId}'(delete).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers'(get).responses.200.description is missing"
      - "attribute paths.'/tellers'(post).responses.200.description is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers/template'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/tellers/{tellerId}/cashiers'(post).responses.200.description\
        \ is missing"
      - "attribute paths.'/workingdays/template'(get).responses.200.description is missing"
      - "attribute paths.'/workingdays'(get).responses.200.description is missing"
      - "attribute paths.'/workingdays'(put).responses.200.description is missing"
      - "attribute paths.'/clients/{clientId}/charges'(post).responses.200.description is\
        \ missing"
      - "attribute paths.'/clients/{clientId}/charges/{chargeId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/search'(get).responses.200.description is missing"
      - "attribute paths.'/search/advance'(post).responses.200.description is missing"
      - "attribute paths.'/search/template'(get).responses.200.description is missing"
      - "attribute paths.'/surveys/{surveyId}/lookuptables'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/surveys/{surveyId}/lookuptables/{key}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/surveys/scorecards/{surveyId}'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/surveys'(get).responses.200.description is missing"
      - "attribute paths.'/surveys/{id}'(get).responses.200.description is missing"
      - "attribute paths.'/templates/template'(get).responses.200.description is missing"
      - "attribute paths.'/templates'(get).responses.200.description is missing"
      - "attribute paths.'/templates'(post).responses.200.description is missing"
      - "attribute paths.'/templates/{templateId}'(get).responses.200.description is missing"
      - "attribute paths.'/templates/{templateId}'(put).responses.200.description is missing"
      - "attribute paths.'/templates/{templateId}'(delete).responses.200.description is\
        \ missing"
      - "attribute paths.'/passwordpreferences'(get).responses.200.description is missing"
      - "attribute paths.'/passwordpreferences/template'(get).responses.200.description\
        \ is missing"
      - "attribute paths.'/permissions'(get).responses.200.description is missing"
      - "attribute paths.'/permissions'(put).responses.200.description is missing"
      - "attribute paths.'/roles/{roleId}'(get).responses.200.description is missing"
      - "attribute paths.'/roles/{roleId}'(put).responses.200.description is missing"
      - "attribute paths.'/roles/{roleId}'(post).responses.200.description is missing"
      - "attribute paths.'/roles/{roleId}'(delete).responses.200.description is missing"
      - "attribute paths.'/roles'(get).responses.200.description is missing"
      - "attribute paths.'/roles'(post).responses.200.description is missing"
      - "attribute paths.'/roles/{roleId}/permissions'(get).responses.200.description is\
        \ missing"
      - "attribute paths.'/roles/{roleId}/permissions'(put).responses.200.description is\
        \ missing"
      - "attribute paths.'/users/template'(get).responses.200.description is missing"
      - "attribute paths.'/users'(get).responses.200.description is missing"
      - "attribute paths.'/users'(post).responses.200.description is missing"
      - "attribute paths.'/users/{userId}'(get).responses.200.description is missing"
      - "attribute paths.'/users/{userId}'(put).responses.200.description is missing"
      - "attribute paths.'/users/{userId}'(delete).responses.200.description is missing"
      - "attribute paths.'/codes/{codeId}/codevalues/{codeValueId}'. Declared path parameter\
        \ codeId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/likelihood/{ppiName}/{likelihoodId}'. Declared path parameter\
        \ ppiName needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/likelihood/{ppiName}/{likelihoodId}'. Declared path parameter\
        \ ppiName needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/accounts/{type}/uploadtemplate'. Declared path parameter type\
        \ needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/accounts/{type}/downloadtemplate'. Declared path parameter type\
        \ needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/{entityType}/{entityId}/calendars/template'. Declared path parameter\
        \ entityType needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/{entityType}/{entityId}/calendars/template'. Declared path parameter\
        \ entityId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/clients/{clientId}/charges/template'. Declared path parameter\
        \ clientId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/clients/{clientId}/familymembers/{familyMemberId}'. Declared\
        \ path parameter clientId needs to be defined as a path parameter in path or operation\
        \ level"
      - "attribute paths.'/clients/{clientId}/familymembers/{familyMemberId}'. Declared\
        \ path parameter clientId needs to be defined as a path parameter in path or operation\
        \ level"
      - "attribute paths.'/clients/{clientId}/familymembers/{familyMemberId}'. Declared\
        \ path parameter clientId needs to be defined as a path parameter in path or operation\
        \ level"
      - "attribute paths.'/clients/{clientId}/identifiers/template'. Declared path parameter\
        \ clientId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/loans/{loanId}/collaterals/template'. Declared path parameter\
        \ loanId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/interestratecharts/{chartId}/chartslabs/template'. Declared path\
        \ parameter chartId needs to be defined as a path parameter in path or operation\
        \ level"
      - "attribute paths.'/loans/{loanId}/guarantors/uploadtemplate'. Declared path parameter\
        \ loanId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/loans/{loanId}/guarantors/template'. Declared path parameter\
        \ loanId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/loans/{loanId}/guarantors/downloadtemplate'. Declared path parameter\
        \ loanId needs to be defined as a path parameter in path or operation level"
      - "attribute paths.'/shareproduct/{productId}/dividend/{dividendId}'. Declared path\
        \ parameter productId needs to be defined as a path parameter in path or operation\
        \ level"
      schemaValidationMessages: - level: "warning"
        domain: "validation"
        keyword: "format"
        message: "format attribute \"uri-reference\" not supported"
        schema:     loadingURI: "#"
          pointer: "/definitions/License/properties/url"
        instance: null
        required: null
        missing: null
      - level: "error"
        domain: "validation"
        keyword: "oneOf"
        message: "instance failed to match exactly one schema (matched 0 out of 2)"
        schema:     loadingURI: "#"
          pointer: "/definitions/Responses/patternProperties/^[1-5](?:\\d{2}|XX)$"
        instance:     pointer: "/paths/~1accountingrules/get/responses/200"
        required: null
        missing: null
      

      In the above response, there are basically 2 types of errors:

      1. "attribute paths.'{path_name}'(request_type).responses.200.description is missing" - This is because the "description" field is empty in all the APIs that are producing this error. Eg. GLClosureApi
      2. "attribute paths.'{path_name}' Declared path parameter\ {path_param} needs to be defined as a path parameter in path or operation level"

       

      Attachments

        Issue Links

          Activity

            People

              Grandolf49 Chinmay Kulkarni
              Grandolf49 Chinmay Kulkarni
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: