rospatent 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c95c34be848baa76a4286b680399c4b76a10b5d4e699776c9d6d735ccbcf4e07
4
- data.tar.gz: fdc55a2649fbaa37d4af103929a1cd25747aae7a409512e052da187b832197ef
3
+ metadata.gz: 1834dfe049a29dc3991bfd687dc030d3ac1c8115fd650b295ebe123f76367285
4
+ data.tar.gz: 126863c21587c0246503f57d6dab07262e46d2332da6468a7a29d48b9736eb8a
5
5
  SHA512:
6
- metadata.gz: cdf8239372f22f997aaca78ec400574a6ad26e470f2827e8c465aba6e6a15958c6f3caf6efa602245d58be3f7612929da720cfb77ffe12a871bb77878b084bc1
7
- data.tar.gz: d852ecfd4103fb1d4bd22b6bc64b1c22f5e63ea8329c01dabd554e8503f647b7f049680fc35ff43d5b30e5e3ca7d94e3f6daf83ea6446d3f6d20e4debe51ed54
6
+ metadata.gz: 57c293f3d982670811e1bd3691e4f1feb8c3c7911eac411d92561a4e104695eba8bdfa043fead62aaa8367034d491b8e8699cc14cf23c13cb6285056c4865de5
7
+ data.tar.gz: 8bc73ec16b985041ba87944c3e4cb248f5508cecaa3f663f39fc21bfb2fcc196c40382d359e9a9faf43aa902145d4a88357514f49fad87577194be5d033b12ea
data/CHANGELOG.md CHANGED
@@ -5,6 +5,64 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.0] - 2025-01-02
9
+
10
+ ### Added
11
+ - **Complete Filter Parameter Validation System**: Comprehensive overhaul of filter parameter handling with API compliance
12
+ - New `validate_filter()`, `validate_filter_values()`, `validate_filter_range()`, and `validate_filter_date()` methods
13
+ - Field validation for all supported filter fields (authors, patent_holders, country, kind, ids, classification codes, dates)
14
+ - Structure validation requiring `{"values": [...]}` format for list filters and `{"range": {"operator": "YYYYMMDD"}}` for date filters
15
+ - Automatic date format conversion from "YYYY-MM-DD" and Date objects to "YYYYMMDD" API format
16
+ - Comprehensive error messages for invalid filter structures and unsupported fields
17
+ - **Enhanced Highlight Parameter Support**: Complete rewrite according to API specification
18
+ - New `validate_string_or_array()` method for tag validation
19
+ - Support for independent `pre_tag` and `post_tag` parameters (both required together)
20
+ - Support for string or array tag values for multi-color highlighting
21
+ - Advanced `highlight` parameter for profile-based highlighting configuration
22
+ - **Improved Error Message Extraction**: Enhanced error handling for Rospatent API responses
23
+ - Error parsing now checks `"result"` field (Rospatent API format) in addition to standard `"error"` and `"message"` fields
24
+ - Updated `extract_validation_errors()` to check `"details"` field for validation errors
25
+ - Applied improvements to both `handle_response()` and `handle_binary_response()` methods
26
+ - **String Enum Validation**: New `validate_string_enum()` method preserving string types for API compliance
27
+ - **Comprehensive Test Coverage**: Added 49+ new tests covering filter validation, highlight functionality, error handling scenarios
28
+ - **Enhanced Rails Integration**: Improved Rails initializer with proper environment variable priority handling
29
+
30
+ ### Fixed
31
+ - **Group_by Parameter API Compliance**: Fixed to use correct API values `"family:docdb"` and `"family:dwpi"` instead of symbol conversion
32
+ - **Environment Variable Priority Issues**: Fixed Rails initializer to prevent DEBUG logs in production when `ROSPATENT_LOG_LEVEL=debug` is set
33
+ - **Filter Parameter Missing Issue**: Added missing `filter` parameter to `validate_search_params` validation rules
34
+ - **Token Configuration Priority**: Improved token loading priority (Rails credentials → `ROSPATENT_TOKEN` → `ROSPATENT_API_TOKEN`)
35
+ - **Configuration Environment Conflicts**: Fixed `load_environment_config` to only override values not explicitly set by environment variables
36
+
37
+ ### Changed
38
+ - **Input Validation Type System**: Extended to support `:string_enum`, `:string_or_array`, and `:hash` validation types
39
+ - **Search Parameter Validation**: Updated client validation to use correct API-compliant parameter types and values
40
+ - **Test Suite Growth**: Expanded from 170 to 219 tests with 465 assertions, all passing with comprehensive integration testing
41
+ - **Documentation Overhaul**: Major README updates with comprehensive filter examples, environment variable documentation, and Rails integration guides
42
+ - **Configuration Management**: Enhanced environment variable handling with clear priority documentation and troubleshooting guides
43
+
44
+ ### Security
45
+ - **Input Validation Strengthening**: Stricter validation prevents invalid requests from reaching API endpoints
46
+ - **Environment Configuration Hardening**: Improved handling of sensitive configuration in different environments
47
+
48
+ ## [1.2.0] - 2025-06-04
49
+
50
+ ### Added
51
+ - Binary data support for `patent_media` and `patent_media_by_id` methods to properly handle PDF, image, and other media files
52
+ - New `binary` parameter for `get` method to distinguish between JSON and binary responses
53
+ - New `handle_binary_response` method for processing binary API responses with proper error handling
54
+ - Russian patent number formatting with automatic zero-padding to 10 digits
55
+ - New `format_publication_number` private method for consistent number formatting across media methods
56
+
57
+ ### Fixed
58
+ - API endpoint paths for `classification_search` and `classification_code` methods now include trailing slashes to prevent 404 errors
59
+ - Binary data corruption issue when downloading patent media files (PDFs, images) through media endpoints
60
+
61
+ ### Changed
62
+ - Enhanced test coverage for binary data handling and publication number formatting
63
+ - Updated README documentation for classification search examples and dataset display conventions
64
+ - Improved error handling consistency for binary vs JSON responses
65
+
8
66
  ## [1.1.0] - 2025-06-04
9
67
 
10
68
  ### Added