Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trust establishment data model spec for Swagger UI #114

Open
andorsk opened this issue Dec 8, 2023 · 5 comments
Open

Add trust establishment data model spec for Swagger UI #114

andorsk opened this issue Dec 8, 2023 · 5 comments
Assignees

Comments

@andorsk
Copy link
Contributor

andorsk commented Dec 8, 2023

openapi: 3.0.0
info:
  title: Trust Establishment API
  version: 1.0.0
paths:
  /trust-establishment:
    post:
      summary: Create a new trust establishment entry
      description: >
        This endpoint allows for the creation of a new trust establishment entry. 
        Clients can submit trust establishment information which is then processed and stored.
      requestBody:
        description: The trust establishment data to be created.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustEstablishment'
      responses:
        '201':
          description: Successfully created a trust establishment entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustEstablishment'
        '400':
          description: Invalid input - the provided data does not conform to the required schema.
components:
  schemas:
    TrustEstablishment:
      $schema: http://json-schema.org/draft-07/schema#
      title: Trust Establishment
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the trust establishment document.
        author:
          type: string
          description: The author of the trust establishment entry.
        created:
          type: string
          format: date-time
          description: The date and time when the entry was created.
        validFrom:
          type: string
          format: date-time
          description: The starting date and time from which the entry is valid.
        validUntil:
          type: string
          format: date-time
          description: The ending date and time until which the entry is valid.
        version:
          type: integer
          description: The version number of the trust establishment entry.
        entries:
          type: object
          patternProperties:
            "\\w :(\/?\/?)[^\\s] ":
              type: object
          additionalProperties: false
          description: A collection of entries, each conforming to a specific pattern.
      required:
        - id
        - author
        - created
        - validFrom
        - version
        - entries
      additionalProperties: false
      description: Schema for a trust establishment entry.
@andorsk
Copy link
Contributor Author

andorsk commented Dec 8, 2023

should have the data model for help. sure the wording could be improved. chatgpt'd so some language can be improved.

@andorsk
Copy link
Contributor Author

andorsk commented Dec 8, 2023

we can add this as a pr, but just putting here for record keeping for now

@sankarshanmukhopadhyay
Copy link
Member

    created:
      type: string
      format: date-time
      description: The date and time when the entry was created.

If an entry needs to be updated would the lifecycle include a revocation and a fresh entry?

@andorsk
Copy link
Contributor Author

andorsk commented Dec 14, 2023

Discussed at ToIP: This is Trust Etablishment spec and needs to be moved to Cred Trust Establishment.
https://identity.foundation/credential-trust-establishment/

@darrellodonnell
Copy link
Collaborator

Why is that? Trust Registries do more than credential exchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants