Skip to content

Commit

Permalink
Update ArkFile fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Jun 7, 2024
1 parent 1380fc2 commit 2766ee0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import java.io.InputStream
@Serializable
data class ArkFileDto(
val name: String,
val absoluteFilePath: String,
val projectDir: String,
val projectName: String,
val absoluteFilePath: String? = null,
val projectDir: String? = null,
val projectName: String? = null,
val namespaces: List<NamespaceDto>,
val classes: List<ClassDto>,
val importInfos: List<ImportInfoDto>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ fun convertToArkClass(clazz: ClassDto): ArkClass {
fun convertToArkFile(file: ArkFileDto): ArkFile {
val classes = file.classes.map { convertToArkClass(it) }
return ArkFile(
name = file.name,
path = file.absoluteFilePath,
projectName = file.projectName,
classes = classes
classes = classes,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.jacodb.panda.dynamic.ark.model

class ArkFile(
val path: String,
val projectName: String,
val name: String,
val path: String? = null,
val classes: List<ArkClass>,
)
20 changes: 13 additions & 7 deletions jacodb-panda-dynamic/src/main/resources/arkfile-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,10 @@
},
"properties": {
"absoluteFilePath": {
"type": "string"
"type": [
"null",
"string"
]
},
"classes": {
"items": {
Expand Down Expand Up @@ -1379,21 +1382,24 @@
"type": "array"
},
"projectDir": {
"type": "string"
"type": [
"null",
"string"
]
},
"projectName": {
"type": "string"
"type": [
"null",
"string"
]
}
},
"required": [
"absoluteFilePath",
"classes",
"exportInfos",
"importInfos",
"name",
"namespaces",
"projectDir",
"projectName"
"namespaces"
],
"type": "object"
}
3 changes: 0 additions & 3 deletions jacodb-panda-dynamic/src/test/resources/basic.ts.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"name": "basic.ts",
"absoluteFilePath": "/home/sapphiron/dev/ark/arkanalyzer/tests/resources/save/basic.ts",
"projectDir": "/home/sapphiron/dev/ark/arkanalyzer/tests/resources/save",
"projectName": "save",
"namespaces": [],
"classes": [
{
Expand Down

0 comments on commit 2766ee0

Please sign in to comment.