Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Book Library Module - Alpha Release Notes
Release Date: April 29, 2024
Version: 1.0.0-alpha
Project: Book Library
Introduction
This is the first alpha release of the Book Library module for Drupal. This module provides a basic API for managing book entities, allowing users to create, view, update, and delete book records, including information such as title, author, publication year, description, and genre.
This is an alpha release, intended for testing purposes only. It is not recommended for use in production environments.
Features
- RESTful API: The module exposes a RESTful API for managing book entities. The following endpoints are available:
GET /api/v1/book/{id}: Retrieves a single book entity.POST /api/v1/book: Creates a new book entity.PATCH /api/v1/book/{id}: Updates an existing book entity.DELETE /api/v1/book/{id}: Deletes a book entity.
- Book Entity: The module defines a custom
bookentity type with the following fields:- Title
- Author
- Publication Year
- Description
- Genre (reference to a taxonomy term)
- Permissions: The module defines the following permissions for controlling access to the API:
View Book EntityAdd Book EntityEdit Book EntityDelete Book Entity
Changes Since Initial Development
- Implemented genre management to prevent duplicate entries. The API now checks for existing genres and uses them if available, or creates new genres as needed.
- Ensured that the API correctly handles genre references during book creation.
- Added validation for required fields during book creation.
- Included comprehensive error handling for invalid requests and missing data.
- Implemented robust permission checks for all API endpoints.
Known Issues
- This is an alpha release, so there may be undiscovered bugs.
- The API may not be fully optimized for performance.
- Further testing is required to ensure compatibility with various Drupal configurations.
- The module lacks comprehensive test coverage.
- The module may require additional features.
Installation
- Install the module as you would any other Drupal module.
- Enable the module in the Drupal admin interface.
- Configure the necessary permissions for users or roles to access the API.
- Use a REST client (e.g., Postman, Insomnia) to interact with the API.
Usage
Detailed instructions on how to use the API endpoints, including example requests and responses, will be provided in a separate documentation file. In the meantime, refer to the code for endpoint paths and expected data structures. For testing with Postman, it is recommended to use OAuth 2.0 token-based authentication for optimal security and flexibility.
Feedback
Please provide any feedback, bug reports, or feature requests by creating issues in the project's issue queue on Drupal.org.
Next Steps
- Address any critical bugs identified during testing.
- Improve test coverage.
- Gather user feedback and consider feature requests.
- Prepare a beta release.