Skip to content

Commit

Permalink
works with go
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Oct 23, 2023
1 parent 9ec4396 commit 7f919fc
Show file tree
Hide file tree
Showing 29 changed files with 473 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/self-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
SDK:
- web5-js
# - web5-kt
- web5-kt
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions sdks/web5-kt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Web5-kt Local Testing and Model Generation

## Running Tests Locally

To run the web5-kt tests on your local machine, execute the following command:

```bash
go run ./cmd/web5-spec-test sdks/web5-kt
```

## Generating Model Files
To generate the model files, use the openapi-generator with the following command:

```bash
openapi-generator generate -i openapi.yaml -g kotlin-server -o ./kotlin-server-generated-server --skip-validate-spec
```

Note: After running the above command, you will need to manually copy the generated model files into the correct directory in the sdk/web5-kt models directory.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models

import com.fasterxml.jackson.annotation.JsonProperty

/**
*
* @param atContext
* @param @context
* @param id
* @param type
* @param issuer
Expand All @@ -22,12 +24,13 @@ package models
* @param credentialSubject
*/
data class CredentialIssuanceRequestCredential(
val atContext: kotlin.collections.List<kotlin.String>,
@JsonProperty("@context")
val `@context`: List<String>?,
val id: kotlin.String,
val type: kotlin.collections.List<kotlin.String>,
val issuer: CredentialIssuer,
val issuanceDate: kotlin.String,
val expirationDate: kotlin.String,
val issuanceDate: kotlin.String?,
val expirationDate: kotlin.String?,
val credentialSubject: kotlin.collections.Map<kotlin.String, kotlin.Any>
)

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models


/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package models
package com.web5.models


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param name
* @param inputDescriptors
* @param id
* @param purpose
* @param submissionRequirements
*/
data class PresentationDefinition(
val name: kotlin.String,
val inputDescriptors: kotlin.collections.List<PresentationDefinitionInputDescriptor>,
val id: kotlin.String? = null,
val purpose: kotlin.String? = null,
val submissionRequirements: kotlin.collections.List<PresentationDefinitionSubmissionRequirement>? = null
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param limitDisclosure
* @param statuses
* @param fields
* @param subjectIsIssuer
* @param isHolder
* @param sameSubject
*/
data class PresentationDefinitionConstraints(
val limitDisclosure: PresentationDefinitionConstraints.LimitDisclosure? = null,
val statuses: PresentationDefinitionStatuses? = null,
val fields: kotlin.collections.List<PresentationDefinitionField>? = null,
val subjectIsIssuer: PresentationDefinitionConstraints.SubjectIsIssuer? = null,
val isHolder: kotlin.collections.List<PresentationDefinitionHolderSubject>? = null,
val sameSubject: kotlin.collections.List<PresentationDefinitionHolderSubject>? = null
)
{
/**
*
* Values: required,preferred
*/
enum class LimitDisclosure(val value: kotlin.String){
required("required"),
preferred("preferred");
}
/**
*
* Values: required,preferred
*/
enum class SubjectIsIssuer(val value: kotlin.String){
required("required"),
preferred("preferred");
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param id
* @param path
* @param purpose
* @param filter
* @param predicate
* @param name
*/
data class PresentationDefinitionField(
val id: kotlin.String? = null,
val path: kotlin.collections.List<kotlin.String>? = null,
val purpose: kotlin.String? = null,
val filter: PresentationDefinitionFilter? = null,
val predicate: PresentationDefinitionField.Predicate? = null,
val name: kotlin.String? = null
)
{
/**
*
* Values: required,preferred
*/
enum class Predicate(val value: kotlin.String){
required("required"),
preferred("preferred");
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param `const`
* @param `enum`
* @param exclusiveMinimum
* @param exclusiveMaximum
* @param format
* @param formatMaximum
* @param formatMinimum
* @param formatExclusiveMaximum
* @param formatExclusiveMinimum
* @param minLength
* @param maxLength
* @param minimum
* @param maximum
* @param pattern
* @param type
*/
data class PresentationDefinitionFilter(
val `const`: kotlin.String? = null,
val `enum`: kotlin.collections.List<kotlin.String>? = null,
val exclusiveMinimum: kotlin.String? = null,
val exclusiveMaximum: kotlin.String? = null,
val format: kotlin.String? = null,
val formatMaximum: kotlin.String? = null,
val formatMinimum: kotlin.String? = null,
val formatExclusiveMaximum: kotlin.String? = null,
val formatExclusiveMinimum: kotlin.String? = null,
val minLength: java.math.BigDecimal? = null,
val maxLength: java.math.BigDecimal? = null,
val minimum: kotlin.String? = null,
val maximum: kotlin.String? = null,
val pattern: kotlin.String? = null,
val type: kotlin.String? = null
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param fieldId
* @param directive
*/
data class PresentationDefinitionHolderSubject(
val fieldId: kotlin.collections.List<kotlin.String>? = null,
val directive: PresentationDefinitionHolderSubject.Directive? = null
)
{
/**
*
* Values: required,preferred
*/
enum class Directive(val value: kotlin.String){
required("required"),
preferred("preferred");
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* web5 SDK test server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.web5.models


/**
*
* @param id
* @param name
* @param purpose
* @param group
* @param issuance
* @param constraints
*/
data class PresentationDefinitionInputDescriptor(
val id: kotlin.String,
val name: kotlin.String? = null,
val purpose: kotlin.String? = null,
val group: kotlin.collections.List<kotlin.String>? = null,
val issuance: kotlin.collections.List<PresentationDefinitionIssuance>? = null,
val constraints: PresentationDefinitionConstraints? = null
)

Loading

0 comments on commit 7f919fc

Please sign in to comment.