Skip to content

Commit 6db4f24

Browse files
release: 0.1.0-alpha.3 (#3)
* codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * feat: support setting headers via env * chore(internal): codegen related update * codegen metadata * codegen metadata * docs: clarify forwards compat behavior * feat(client): more robust error parsing * chore: remove duplicated dokka setup * perf(client): create one json mapper * codegen metadata * release: 0.1.0-alpha.3 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 49495db commit 6db4f24

1,038 files changed

Lines changed: 20035 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.2"
2+
".": "0.1.0-alpha.3"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 959
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot%2Fhubspot-sdk-27f6d2f8adbca1ec11995d8f923efadd9bfd5bc7cd569690aaf0ff634949feaa.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-a393b1d7074c56c47932ec0f1e328d567f1466ecdbc04c19e7067df1b097ecb0.yml
33
openapi_spec_hash: d0e76c7f7ecb1e8f701d4ced83be404f
4-
config_hash: 1ad21cf783009b5c5ceb99a6f2d335f3
4+
config_hash: 3c65b4da968b08d5322cacebf983ccb9

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## 0.1.0-alpha.3 (2026-05-05)
4+
5+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/HubSpot/hubspot-sdk-java/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
6+
7+
### Features
8+
9+
* **client:** more robust error parsing ([f6dd878](https://github.com/HubSpot/hubspot-sdk-java/commit/f6dd878bb046e4c2ff6f1ed442abcca205c96d1e))
10+
* support setting headers via env ([60eaf6b](https://github.com/HubSpot/hubspot-sdk-java/commit/60eaf6bea52c1f98081ae35cc23ab670a176d757))
11+
12+
13+
### Performance Improvements
14+
15+
* **client:** create one json mapper ([53af0a7](https://github.com/HubSpot/hubspot-sdk-java/commit/53af0a708032d203da579ce17f708436a3ab258c))
16+
17+
18+
### Chores
19+
20+
* **internal:** codegen related update ([56e25ee](https://github.com/HubSpot/hubspot-sdk-java/commit/56e25ee7fc891b6230a017b2030f49eea67fb708))
21+
* remove duplicated dokka setup ([6d37366](https://github.com/HubSpot/hubspot-sdk-java/commit/6d373661eeae06fcdb86056c25acf17a6a39449b))
22+
23+
24+
### Documentation
25+
26+
* clarify forwards compat behavior ([a0f8e51](https://github.com/HubSpot/hubspot-sdk-java/commit/a0f8e51103f73a2c6c6965120ee548660aa7bccd))
27+
328
## 0.1.0-alpha.2 (2026-04-24)
429

530
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/HubSpot/hubspot-sdk-java/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.hubspot.sdk/hubspot-java)](https://central.sonatype.com/artifact/com.hubspot.sdk/hubspot-java/0.1.0-alpha.2)
6-
[![javadoc](https://javadoc.io/badge2/com.hubspot.sdk/hubspot-java/0.1.0-alpha.2/javadoc.svg)](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.2)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.hubspot.sdk/hubspot-java)](https://central.sonatype.com/artifact/com.hubspot.sdk/hubspot-java/0.1.0-alpha.3)
6+
[![javadoc](https://javadoc.io/badge2/com.hubspot.sdk/hubspot-java/0.1.0-alpha.3/javadoc.svg)](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.3)
77

88
<!-- x-release-please-end -->
99

@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1313

1414
<!-- x-release-please-start-version -->
1515

16-
The REST API documentation can be found on [developers.hubspot.com](https://developers.hubspot.com/docs/api-reference/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.2).
16+
The REST API documentation can be found on [developers.hubspot.com](https://developers.hubspot.com/docs/api-reference/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.hubspot.sdk/hubspot-java/0.1.0-alpha.3).
1717

1818
<!-- x-release-please-end -->
1919

@@ -24,7 +24,7 @@ The REST API documentation can be found on [developers.hubspot.com](https://deve
2424
### Gradle
2525

2626
```kotlin
27-
implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.2")
27+
implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.3")
2828
```
2929

3030
### Maven
@@ -33,7 +33,7 @@ implementation("com.hubspot.sdk:hubspot-java:0.1.0-alpha.2")
3333
<dependency>
3434
<groupId>com.hubspot.sdk</groupId>
3535
<artifactId>hubspot-java</artifactId>
36-
<version>0.1.0-alpha.2</version>
36+
<version>0.1.0-alpha.3</version>
3737
</dependency>
3838
```
3939

@@ -312,7 +312,6 @@ import com.hubspot.sdk.models.PublicObjectId;
312312
import com.hubspot.sdk.models.crm.SimplePublicObject;
313313
import com.hubspot.sdk.models.crm.objects.PublicAssociationsForObject;
314314
import com.hubspot.sdk.models.crm.objects.SimplePublicObjectInputForCreate;
315-
import com.hubspot.sdk.models.crm.objects.contacts.ContactCreateParams;
316315

317316
SimplePublicObjectInputForCreate params = SimplePublicObjectInputForCreate.builder()
318317
.addAssociation(PublicAssociationsForObject.builder()
@@ -799,7 +798,9 @@ In rare cases, the API may return a response that doesn't match the expected typ
799798

800799
By default, the SDK will not throw an exception in this case. It will throw [`HubSpotInvalidDataException`](hubspot-java-core/src/main/kotlin/com/hubspot/sdk/errors/HubSpotInvalidDataException.kt) only if you directly access the property.
801800

802-
If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
801+
Validating the response is _not_ forwards compatible with new types from the API for existing fields.
802+
803+
If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:
803804

804805
```java
805806
import com.hubspot.sdk.models.crm.objects.SimplePublicObjectWithAssociations;

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99

1010
allprojects {
1111
group = "com.hubspot.sdk"
12-
version = "0.1.0-alpha.2" // x-release-please-version
12+
version = "0.1.0-alpha.3" // x-release-please-version
1313
}
1414

1515
subprojects {
@@ -22,7 +22,6 @@ subprojects {
2222
group = "Verification"
2323
description = "Verifies all source files are formatted."
2424
}
25-
apply(plugin = "org.jetbrains.dokka")
2625
}
2726

2827
subprojects {

hubspot-java-client-okhttp/src/main/kotlin/com/hubspot/sdk/client/okhttp/HubSpotOkHttpClient.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ class HubSpotOkHttpClient private constructor() {
230230
/**
231231
* Whether to call `validate` on every response before returning it.
232232
*
233+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
234+
* existing fields.
235+
*
233236
* Defaults to false, which means the shape of the response will not be validated upfront.
234237
* Instead, validation will only occur for the parts of the response that are accessed.
235238
*/

hubspot-java-client-okhttp/src/main/kotlin/com/hubspot/sdk/client/okhttp/HubSpotOkHttpClientAsync.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ class HubSpotOkHttpClientAsync private constructor() {
230230
/**
231231
* Whether to call `validate` on every response before returning it.
232232
*
233+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
234+
* existing fields.
235+
*
233236
* Defaults to false, which means the shape of the response will not be validated upfront.
234237
* Instead, validation will only occur for the parts of the response that are accessed.
235238
*/

hubspot-java-core/src/main/kotlin/com/hubspot/sdk/core/ClientOptions.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ private constructor(
8080
/**
8181
* Whether to call `validate` on every response before returning it.
8282
*
83+
* Setting this to `true` is _not_ forwards compatible with new types from the API for existing
84+
* fields.
85+
*
8386
* Defaults to false, which means the shape of the response will not be validated upfront.
8487
* Instead, validation will only occur for the parts of the response that are accessed.
8588
*/
@@ -265,6 +268,9 @@ private constructor(
265268
/**
266269
* Whether to call `validate` on every response before returning it.
267270
*
271+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
272+
* existing fields.
273+
*
268274
* Defaults to false, which means the shape of the response will not be validated upfront.
269275
* Instead, validation will only occur for the parts of the response that are accessed.
270276
*/
@@ -416,6 +422,14 @@ private constructor(
416422
(System.getProperty("hubspot.baseUrl") ?: System.getenv("HUBSPOT_BASE_URL"))?.let {
417423
baseUrl(it)
418424
}
425+
System.getenv("HUBSPOT_CUSTOM_HEADERS")?.let { customHeadersEnv ->
426+
for (line in customHeadersEnv.split("\n")) {
427+
val colon = line.indexOf(':')
428+
if (colon >= 0) {
429+
putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim())
430+
}
431+
}
432+
}
419433
}
420434

421435
/**

hubspot-java-core/src/main/kotlin/com/hubspot/sdk/core/ObjectMappers.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ import java.time.ZoneId
2929
import java.time.format.DateTimeFormatter
3030
import java.time.temporal.ChronoField
3131

32-
fun jsonMapper(): JsonMapper =
32+
fun jsonMapper(): JsonMapper = JSON_MAPPER
33+
34+
private val JSON_MAPPER: JsonMapper =
3335
JsonMapper.builder()
3436
.addModule(kotlinModule())
3537
.addModule(Jdk8Module())

hubspot-java-core/src/main/kotlin/com/hubspot/sdk/core/RequestOptions.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ class RequestOptions private constructor(val responseValidation: Boolean?, val t
3333
private var responseValidation: Boolean? = null
3434
private var timeout: Timeout? = null
3535

36+
/**
37+
* Whether to call `validate` on the response before returning it.
38+
*
39+
* Setting this to `true` is _not_ forwards compatible with new types from the API for
40+
* existing fields.
41+
*
42+
* Defaults to false, which means the shape of the response will not be validated upfront.
43+
* Instead, validation will only occur for the parts of the response that are accessed.
44+
*/
3645
fun responseValidation(responseValidation: Boolean) = apply {
3746
this.responseValidation = responseValidation
3847
}

0 commit comments

Comments
 (0)