Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.5.1",
"cliVersion": "5.7.7",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.6.1",
"generatorConfig": {
Expand All @@ -9,10 +9,10 @@
"client-class-name": "Junction",
"enable-forward-compatible-enums": true
},
"originGitCommit": "05d79dd6ce370cbd029417f59eb71c056d94aa61",
"originGitCommit": "ec33b15e9d0ad30bc16f88a10d2500f900182d1e",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "0.0.1"
"sdkVersion": "1.0.0"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'com.junction:junction-java:0.0.1'
implementation 'com.junction:junction-java:1.0.0'
}
```

Expand All @@ -41,7 +41,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.junction</groupId>
<artifactId>junction-java</artifactId>
<version>0.0.1</version>
<version>1.0.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.junction'

version = '0.0.1'
version = '1.0.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.junction'
artifactId = 'junction-java'
version = '0.0.1'
version = '1.0.0'
from components.java
pom {
name = 'vital'
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.0 - 2026-05-04
### Breaking Changes
* **`MealInDbBaseClientFacingSource` builder** — the `TimestampStage.timestamp()` method now returns `CalendarDateStage` instead of `NameStage`; existing builder chains must insert a `.calendarDate(...)` call between `.timestamp(...)` and `.name(...)`.
### Added
* **`MealInDbBaseClientFacingSource.getCalendarDate()`** — new required field exposing the meal date in `YYYY-MM-dd` format, sourced from the `calendar_date` JSON property.

## 0.0.1 - 2026-05-01
* Initial SDK generation
* 🌿 Generated with Fern
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/junction/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.junction:junction-java/0.0.1");
put("User-Agent", "com.junction:junction-java/1.0.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.vital.fern:api-sdk");
put("X-Fern-SDK-Version", "0.0.1");
put("X-Fern-SDK-Version", "1.0.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public final class MealInDbBaseClientFacingSource {

private final OffsetDateTime timestamp;

private final String calendarDate;

private final String name;

private final Optional<Energy> energy;
Expand Down Expand Up @@ -66,6 +68,7 @@ private MealInDbBaseClientFacingSource(
int sourceId,
String providerId,
OffsetDateTime timestamp,
String calendarDate,
String name,
Optional<Energy> energy,
Optional<Macros> macros,
Expand All @@ -83,6 +86,7 @@ private MealInDbBaseClientFacingSource(
this.sourceId = sourceId;
this.providerId = providerId;
this.timestamp = timestamp;
this.calendarDate = calendarDate;
this.name = name;
this.energy = energy;
this.macros = macros;
Expand Down Expand Up @@ -135,6 +139,14 @@ public OffsetDateTime getTimestamp() {
return timestamp;
}

/**
* @return Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.
*/
@JsonProperty("calendar_date")
public String getCalendarDate() {
return calendarDate;
}

@JsonProperty("name")
public String getName() {
return name;
Expand Down Expand Up @@ -248,6 +260,7 @@ private boolean equalTo(MealInDbBaseClientFacingSource other) {
&& sourceId == other.sourceId
&& providerId.equals(other.providerId)
&& timestamp.equals(other.timestamp)
&& calendarDate.equals(other.calendarDate)
&& name.equals(other.name)
&& energy.equals(other.energy)
&& macros.equals(other.macros)
Expand All @@ -269,6 +282,7 @@ public int hashCode() {
this.sourceId,
this.providerId,
this.timestamp,
this.calendarDate,
this.name,
this.energy,
this.macros,
Expand Down Expand Up @@ -322,7 +336,14 @@ public interface ProviderIdStage {
}

public interface TimestampStage {
NameStage timestamp(@NotNull OffsetDateTime timestamp);
CalendarDateStage timestamp(@NotNull OffsetDateTime timestamp);
}

public interface CalendarDateStage {
/**
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
*/
NameStage calendarDate(@NotNull String calendarDate);
}

public interface NameStage {
Expand Down Expand Up @@ -391,6 +412,7 @@ public static final class Builder
SourceIdStage,
ProviderIdStage,
TimestampStage,
CalendarDateStage,
NameStage,
SourceStage,
CreatedAtStage,
Expand All @@ -408,6 +430,8 @@ public static final class Builder

private OffsetDateTime timestamp;

private String calendarDate;

private String name;

private ClientFacingSource source;
Expand Down Expand Up @@ -441,6 +465,7 @@ public Builder from(MealInDbBaseClientFacingSource other) {
sourceId(other.getSourceId());
providerId(other.getProviderId());
timestamp(other.getTimestamp());
calendarDate(other.getCalendarDate());
name(other.getName());
energy(other.getEnergy());
macros(other.getMacros());
Expand Down Expand Up @@ -506,11 +531,23 @@ public TimestampStage providerId(@NotNull String providerId) {

@java.lang.Override
@JsonSetter("timestamp")
public NameStage timestamp(@NotNull OffsetDateTime timestamp) {
public CalendarDateStage timestamp(@NotNull OffsetDateTime timestamp) {
this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null");
return this;
}

/**
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
* <p>Date of the meal in the YYYY-mm-dd format. For providers that only expose a date, this is the calendar date as recorded by the user.</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@JsonSetter("calendar_date")
public NameStage calendarDate(@NotNull String calendarDate) {
this.calendarDate = Objects.requireNonNull(calendarDate, "calendarDate must not be null");
return this;
}

@java.lang.Override
@JsonSetter("name")
public SourceStage name(@NotNull String name) {
Expand Down Expand Up @@ -686,6 +723,7 @@ public MealInDbBaseClientFacingSource build() {
sourceId,
providerId,
timestamp,
calendarDate,
name,
energy,
macros,
Expand Down
Loading