Refactor the metadata API to conform to best practices.

Perform model validation on document type metadata type and
document type API endpoints.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-02-23 02:13:59 -04:00
parent c8e9a625da
commit 70dfb1561d
5 changed files with 561 additions and 327 deletions

View File

@@ -9,6 +9,27 @@ What's new
API changes
-----------
Refactor of the metadata API URLs to use the resource/sub resource paradigm.
Before:
/api/metadata/metadata_types/
/api/metadata/metadata_types/{pk}/
/api/metadata/document/metadata/{pk}/
/api/metadata/document/{pk}/metadata/
/api/metadata/document_type/{document_type_pk}/metadata_types/optional/
/api/metadata/document_type/{document_type_pk}/metadata_types/required/
After:
/api/metadata/metadata_types/
/api/metadata/metadata_types/{metadata_type_pk}/
/api/metadata/document_types/{document_type_pk}/metadata_types/
/api/metadata/document_types/{document_type_pk}/metadata_types/{metadata_type_pk}/
/api/metadata/documents/{document_pk}/metadata/
/api/metadata/documents/{document_pk}/metadata/{metadata_pk}/
Document API URLs updated to use the resource/sub resource paradigm.
Before:
@@ -95,7 +116,7 @@ Other changes
- Add custom test runner replacing the custom management command runtests.
The 'test-all' Makefile target that called the `runtests` command has been removed too.
- Testing for orphaned temporary files and orphaned file handles is now optional and
- Testing for orphaned temporary files and orphaned file handles is now optional and
controlled by the COMMON_TEST_FILE_HANDLES and COMMON_TEST_FILE_HANDLES settings.
Removals