-
Notifications
You must be signed in to change notification settings - Fork 5
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.
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
MODINVOICE-17 Define API #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is worth to update Jenkinsfile to enable publishModDescriptor, publishAPI, mvnDeploy, runLintRamlCop.
mvnDeploy, runLintRamlCop and docker
INFO: lint-raml-cop: Investigating and determining configuration: mod-invoice/ramls INFO: lint-raml-cop: Assessing schema files (https://dev.folio.org/guides/describe-schema/): INFO: lint-raml-cop: Found 84 JSON schema files under directory './ramls' INFO: lint-raml-cop: invoice.json: Each property "description" is present. ERROR: lint-raml-cop: invoiceCollection.json: Missing "description" for: invoices INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/adjustment.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_line_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_line.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/ledger_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/budget.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fiscal_year_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/transaction.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/budget_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_distribution_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_distribution.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/transaction_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fiscal_year.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/encumbrance.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/ledger.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/encumbrance_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/category.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_type.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/account_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/url_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/alias.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_type_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/email.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/interface_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/phone_number_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/email_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/agreement.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/alias_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/changelog.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/interface.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/contact_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/agreement_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/address.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/category_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/account.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/url.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/address_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/error.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/contact.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/phone_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/receivingCollection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/receivingResults.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_purchase_orders.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_po_line.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/po_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_purchase_order.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/checkinCollection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/common/schemas/sequence_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/po_line_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/receiving_history.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/adjustment.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/po_line.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/receiving_history_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/contributor.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/alert.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/vendor_detail.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/physical.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/renewal.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/cost.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/location.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/purchase_order.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/fund_distribution.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/details.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/close_reason.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/license.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/alert_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/reporting_code_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/piece.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/reporting_code.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/purchase_order_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/claim.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/piece_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/eresource.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/source.json: Each property "description" is present. INFO: lint-raml-cop: Not assessing RAML/Schema or examples against schema, as per option '--json-only'. ERROR: lint-raml-cop: There were processing errors. See list above. |
INFO: lint-raml-cop: Investigating and determining configuration: mod-invoice/ramls INFO: lint-raml-cop: Assessing schema files (https://dev.folio.org/guides/describe-schema/): INFO: lint-raml-cop: Found 84 JSON schema files under directory './ramls' ERROR: lint-raml-cop: invoiceCollection.json: Missing "description" for: invoices INFO: lint-raml-cop: invoice.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/reporting_code.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/close_reason.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/eresource.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/adjustment.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/source.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/physical.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/piece.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/po_line_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/contributor.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/alert.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/purchase_order.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/alert_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/renewal.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/receiving_history.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/details.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/purchase_order_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/claim.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/fund_distribution.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/po_line.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/cost.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/receiving_history_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/piece_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/vendor_detail.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/reporting_code_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/location.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders-storage/schemas/license.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/encumbrance_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/transaction.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/ledger_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/budget_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_distribution_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/transaction_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/budget.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/ledger.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fund_distribution.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fiscal_year_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/fiscal_year.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-finance/schemas/encumbrance.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/checkinCollection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_purchase_order.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_purchase_orders.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/receivingResults.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/receivingCollection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/composite_po_line.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-orders/schemas/po_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/phone_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/url.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_type.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/agreement.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/address_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/account_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_type_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/contact_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/category_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/interface_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/category.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/phone_number_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/alias.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/interface.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/email_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/address.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/contact.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/error.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/url_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/changelog.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/alias_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/vendor.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/email.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/account.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-vendors/schemas/agreement_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/common/schemas/sequence_number.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/adjustment.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_line_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_collection.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice.json: Each property "description" is present. INFO: lint-raml-cop: acq-models/mod-invoice-storage/schemas/invoice_line.json: Each property "description" is present. INFO: lint-raml-cop: Not assessing RAML/Schema or examples against schema, as per option '--json-only'. ERROR: lint-raml-cop: There were processing errors. See list above. |
Whoops, looks like there are some raml-cop issues you need to resolve |
@craigmcnally Done, I had an extra copy of schema locally which was throwing an error. Removing those fixed raml-lint-cop error. |
}, | ||
{ | ||
"methods": ["POST"], | ||
"pathPattern": "/invoice", | ||
"permissionsRequired": ["invoice.item.post"] | ||
"pathPattern": "/invoicing/invoices", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://dev.folio.org/guidelines/naming-conventions/ . According to the naming conventions
The first portion is the exact name of the responsible module (back-end modules drop the mod- prefix).
Should we be renaming the module? or the permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't rename the module then permission names will be like:
invoice.invoice.item.post
invoice.invoice-lines.item.post
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer this and keep the module name as is:
invoice.item.post
invoice-lines.item.post
invoice-number.item.post
Any thoughts @craigmcnally @piotr-kalashuk ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn it, I was unaware of the "exact name of the responsible module" part.
I guess it should be:
invoice.invoices.item.post
invoice.invoice-lines.item.post
etc.
Sorry for the confusion @javalkar-varun I should have known about this convention. Good catch @KVupp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. I have corrected permission names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not part of this PR, but the deployment descriptor has the parameter embed_postgres=true. Can you please remove that as this is a business logic module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Varun. I've updated the API listing document to reflect the new paths
exampleCollection: !include acq-models/mod-invoice-storage/examples/invoice_line_collection.sample | ||
exampleItem: !include acq-models/mod-invoice-storage/examples/invoice_line.sample | ||
is: [validate] | ||
get: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add pageable to get end point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one inline comment. It looks good otherwise!
Purpose
https://issues.folio.org/browse/MODINVOICE-17
Approach
.gitmodules
to create ramls/acq-models sub-folderPre-Merge Checklist:
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.