Skip to content

Commit

Permalink
improvement: rename package to filepath (#12)
Browse files Browse the repository at this point in the history
* rename package to filepath

* filepath is mandatory
  • Loading branch information
dsinghvi authored Apr 11, 2022
1 parent 51febd1 commit 69a1979
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 45 deletions.
6 changes: 6 additions & 0 deletions fern-api-java-types/src/main/java/com/fern/IWithFilepath.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.fern;

interface IWithFilepath {

String filepath();
}
8 changes: 0 additions & 8 deletions fern-api-java-types/src/main/java/com/fern/IWithPackage.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
@Value.Immutable
@StagedBuilderStyle
@JsonDeserialize(as = ImmutableNamedTypeReference.class)
public interface NamedTypeReference extends IWithPackage {
public interface NamedTypeReference extends IWithFilepath {

String name();

static ImmutableNamedTypeReference.NameBuildStage builder() {
static ImmutableNamedTypeReference.FilepathBuildStage builder() {
return ImmutableNamedTypeReference.builder();
}
}
15 changes: 15 additions & 0 deletions fern-api-java-types/src/main/java/com/fern/WithFilepath.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.fern;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fern.immutables.StagedBuilderStyle;
import org.immutables.value.Value;

@Value.Immutable
@StagedBuilderStyle
@JsonDeserialize(as = ImmutableWithFilepath.class)
public interface WithFilepath extends IWithFilepath {

static ImmutableWithFilepath.FilepathBuildStage builder() {
return ImmutableWithFilepath.builder();
}
}
15 changes: 0 additions & 15 deletions fern-api-java-types/src/main/java/com/fern/WithPackage.java

This file was deleted.

16 changes: 0 additions & 16 deletions fern-api-java-types/src/main/java/com/fern/test/Main.java

This file was deleted.

8 changes: 4 additions & 4 deletions fern-api/fern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ WithDocs:
docs: optional<string>

NamedTypeReference:
extends: WithPackage
extends: WithFilepath
fields:
name: string

WithPackage:
WithFilepath:
fields:
package: string
filepath: string

Type:
union:
Expand Down Expand Up @@ -105,7 +105,7 @@ Services:

BaseService:
extends:
- WithPackage
- WithFilepath
- WithDocs
fields:
name: string
Expand Down

0 comments on commit 69a1979

Please sign in to comment.