You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Yemdjih Kaze Nasser (Jira)" <ji...@apache.org> on 2020/08/23 13:19:00 UTC

[jira] [Resolved] (FINERACT-1105) Swagger generates invalid Open API Specification file

     [ https://issues.apache.org/jira/browse/FINERACT-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yemdjih Kaze Nasser resolved FINERACT-1105.
-------------------------------------------
    Fix Version/s: 1.4.0
       Resolution: Fixed

> Swagger generates invalid Open API Specification file
> -----------------------------------------------------
>
>                 Key: FINERACT-1105
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1105
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Chinmay Kulkarni
>            Assignee: Chinmay Kulkarni
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> The Open API Specification file produced by Swagger Gradle Plugin is invalid.
>  # Run *./gradlew build*
>  # 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:
> {code:yaml}
> ---
> 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
> {code}
> In the above response, there are basically 2 types of errors:
>  # *"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|https://github.com/apache/fineract/blob/a31d29f1f0aac86c6c7ceb6e1c5e513838312336/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java#L102]
>  # *"attribute paths.'\{path_name}' Declared path parameter\ \{**path_param**} needs to be defined as a path parameter in path or operation level"*
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)