contentful-management 3.12.0 → 3.12.1

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: d3d63b88cb40993d64e55a0f9a50989a3e99963891555c7e68da940808147c7d
4
- data.tar.gz: 7e246681551ffdfce7d5382cf614d95b5e0c556c577aab035ca82ba3eae56510
3
+ metadata.gz: 56d0e038c4cae4241faf07f5ec3e5c8dbcd5fbd802b9319fe63deb5a0d9b710f
4
+ data.tar.gz: a41ac6aa58eb40fddbc958ae4d5fc4141128dee19d8adf01fedb08f9339f8c79
5
5
  SHA512:
6
- metadata.gz: 4b3951f8ea5f59c913ff237226bba6570905312267b36088bd011fbf07e8befe2b4edf4d8e5561a1c35db5b094bc303488b8581b092e89e5a9ba6ade2df70173
7
- data.tar.gz: 2fafc92979fbee9f7d28d9467f778b02b8478861055b7a55259c1b10b3ebcedc5fc6b41b74d6addc5006a9fe16a90fff388588e873651c42426d6ebd727b4b31
6
+ metadata.gz: ed006e26bb7fb80d3d4cb6528d93bf85ccd80de8b09f56576bb09693a4d15491709d60ce3231bfdd6b502dddb26274789ace3b642655cb197a6130bf1ff8a89a
7
+ data.tar.gz: 83ee2e63032be31a835e3779c06ae76d1902c536d973fb65837d81b0b72dd15923cef269971f2ad972506ecceea3c6ee560049dfbb2feea1d08a3e31a112e17e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ ## 3.12.1
6
+ * Add support for creating concept schemes with user-defined ID
7
+
5
8
  ## 3.12.0
6
9
  * Add support for Taxonomy endpoints
7
10
 
data/README.md CHANGED
@@ -1092,6 +1092,12 @@ Creating a concept scheme:
1092
1092
  client.taxonomy_concept_schemes('organization_id').create(prefLabel: { 'en-US' => 'New Scheme' })
1093
1093
  ```
1094
1094
 
1095
+ Creating a concept scheme with a user-defined ID:
1096
+
1097
+ ```ruby
1098
+ client.taxonomy_concept_schemes('organization_id').create(id: 'my-custom-scheme-id', prefLabel: { 'en-US' => 'New Scheme' })
1099
+ ```
1100
+
1095
1101
  Fetching the total number of concept schemes:
1096
1102
 
1097
1103
  ```ruby
@@ -53,7 +53,10 @@ module Contentful
53
53
  def self.create(client, organization_id, attributes)
54
54
  requester = ResourceRequester.new(client, self)
55
55
  requester.create(
56
- { organization_id: organization_id },
56
+ {
57
+ organization_id: organization_id,
58
+ id: attributes[:id]
59
+ }.compact,
57
60
  attributes
58
61
  )
59
62
  end
@@ -5,6 +5,6 @@ module Contentful
5
5
  # Management Namespace
6
6
  module Management
7
7
  # Gem Version
8
- VERSION = '3.12.0'
8
+ VERSION = '3.12.1'
9
9
  end
10
10
  end
@@ -0,0 +1,74 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.contentful.com/organizations/4kQeJmhUWIKtNNmMkketza/taxonomy/concept-schemes/custom-scheme-id
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"id":"custom-scheme-id","prefLabel":{"en-US":"Custom Bike"}}'
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/3.12.0; platform ruby/3.4.3; os macOS/24;
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ User-Agent:
21
+ - http.rb/5.0.1
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Connection:
28
+ - close
29
+ Content-Length:
30
+ - '531'
31
+ Date:
32
+ - Wed, 17 Dec 2025 01:31:33 GMT
33
+ Content-Type:
34
+ - application/vnd.contentful.management.v1+json
35
+ Access-Control-Allow-Methods:
36
+ - DELETE,GET,HEAD,POST,PUT,PATCH,OPTIONS
37
+ X-Contentful-Ratelimit-Second-Remaining:
38
+ - '9'
39
+ X-Contentful-Ratelimit-Second-Limit:
40
+ - '10'
41
+ X-Contentful-Ratelimit-Reset:
42
+ - '0'
43
+ Access-Control-Expose-Headers:
44
+ - Etag,x-contentful-request-id,x-contentful-ai-actions-ratelimit-reset
45
+ Access-Control-Max-Age:
46
+ - '1728000'
47
+ Server-Timing:
48
+ - miss, origin;dur=147
49
+ Cache-Control:
50
+ - no-cache
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ Server:
56
+ - Contentful
57
+ X-Contentful-Request-Id:
58
+ - 9cdf049c-b4a0-475f-9802-6e019b0f8a9f
59
+ Contentful-Api:
60
+ - cma
61
+ Contentful-Upstream:
62
+ - taxonomy-service
63
+ Access-Control-Allow-Origin:
64
+ - "*"
65
+ Access-Control-Allow-Headers:
66
+ - Accept,Accept-Language,Authorization,Cache-Control,Cf-Context,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-Tag-Visibility,X-Contentful-User-Agent,X-Contentful-User-Id,X-Contentful-Enable-Alpha-Feature,X-Contentful-Source-Environment,X-Contentful-Team,X-Contentful-Parent-Id,x-contentful-validate-only,X-Contentful-Skip-UI-Draft-Validation,X-Contentful-Marketplace,X-Contentful-UI-Content-Auto-Save,cf-trace,X-Contentful-Comment-Body-Format,X-Contentful-Parent-Entity-Reference,X-Contentful-Personal-Intercept,X-Contentful-Include-Invocation-Metadata,X-Contentful-Async-Ai-Action,x-contentful-ai-actions-platform
67
+ X-Served-By:
68
+ - cache-bkk2310024-BKK
69
+ body:
70
+ encoding: ASCII-8BIT
71
+ string: '{"sys":{"id":"custom-scheme-id","type":"TaxonomyConceptScheme","createdAt":"2025-12-17T01:31:32.953Z","updatedAt":"2025-12-17T01:31:32.953Z","organization":{"sys":{"id":"4kQeJmhUWIKtNNmMkketza","type":"Link","linkType":"Organization"}},"createdBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"updatedBy":{"sys":{"id":"59Erm8D1JuuD273aXNb65T","type":"Link","linkType":"User"}},"version":1},"uri":null,"topConcepts":[],"concepts":[],"totalConcepts":0,"prefLabel":{"en-US":"Custom
72
+ Bike"},"definition":null}'
73
+ recorded_at: Wed, 17 Dec 2025 01:31:32 GMT
74
+ recorded_with: VCR 6.2.0
@@ -53,6 +53,18 @@ module Contentful
53
53
  expect(scheme.pref_label['en-US']).to eq('New Scheme')
54
54
  end
55
55
  end
56
+
57
+ it 'creates a taxonomy concept scheme with a user-defined id' do
58
+ vcr('taxonomy_concept_scheme/create_with_id') do
59
+ scheme = subject.create(
60
+ id: 'custom-scheme-id',
61
+ prefLabel: { 'en-US' => 'Custom Bike' }
62
+ )
63
+ expect(scheme).to be_a(Contentful::Management::TaxonomyConceptScheme)
64
+ expect(scheme.id).to eq('custom-scheme-id')
65
+ expect(scheme.pref_label['en-US']).to eq('Custom Bike')
66
+ end
67
+ end
56
68
  end
57
69
 
58
70
  describe '#update' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.0
4
+ version: 3.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Protas
@@ -777,6 +777,7 @@ files:
777
777
  - spec/fixtures/vcr_cassettes/taxonomy_concept/update.yml
778
778
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/all.yml
779
779
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/create.yml
780
+ - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/create_with_id.yml
780
781
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/destroy.yml
781
782
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/find.yml
782
783
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/total.yml
@@ -1232,6 +1233,7 @@ test_files:
1232
1233
  - spec/fixtures/vcr_cassettes/taxonomy_concept/update.yml
1233
1234
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/all.yml
1234
1235
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/create.yml
1236
+ - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/create_with_id.yml
1235
1237
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/destroy.yml
1236
1238
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/find.yml
1237
1239
  - spec/fixtures/vcr_cassettes/taxonomy_concept_scheme/total.yml