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

Upgrade individual bindings #273

Open
jonaslagoni opened this issue Aug 16, 2024 · 7 comments
Open

Upgrade individual bindings #273

jonaslagoni opened this issue Aug 16, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@jonaslagoni
Copy link
Member

Should be possible to migrate/upgrade bindings individually without having to convert the entire document.

@jonaslagoni jonaslagoni added the enhancement New feature or request label Aug 16, 2024
@ItshMoh
Copy link
Contributor

ItshMoh commented Aug 23, 2024

hello @jonaslagoni are you talking about this individual binding where on method of post is converted into async api format. Not the entire document. Am i going in the right path. Here the async version in 2.0.0 it should be the latest.
OPENAPI

openapi: 3.0.0
info:
  title: Order Service
  version: '1.0'
paths:
  /order/{id}:
    get:
      summary: Retrieve an order by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'

  /order:
    post:
      summary: Create a new order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Order'
      responses:
        '201':
          description: Order created successfully
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
        item:
          type: string
        quantity:
          type: integer

`
**ASYNCAPI**
`asyncapi: '2.0.0'
info:
  title: Order Service
  version: '1.0'
channels:
  order/created:
    description: Channel where new orders are published
    publish:
      operationId: publishOrderCreated
      summary: Publish a message when a new order is created
      message:
        contentType: application/json
        payload:
          $ref: '#/components/schemas/Order'
components:
  schemas:
    Order:
      type: object
      properties:
        id:
          type: string
        item:
          type: string
        quantity:
          type: integer
`

@jonaslagoni
Copy link
Member Author

@ItshMoh please format code snippets, no one can read that 😄

But regardless, no I am not talking about OpenAPI at all, only the AsyncAPI bindings, so when a binding changes version from 1.0.0 to 2.0.0, the converter should have the functionality to upgrade the existing AsyncAPI document to use the new bindings.

@ItshMoh
Copy link
Contributor

ItshMoh commented Aug 23, 2024

@jonaslagoni my bad for not formatting the code. Thanks for the clarification.

@ItshMoh
Copy link
Contributor

ItshMoh commented Aug 23, 2024

@jonaslagoni . As i have understood the problem, we should have the flexibility of changing version of one binding
without changing the whole document. For example we just want to change the version of message binding leaving the document.
Am i going in the right path. If you can give more insights to the issue it will be helpful

@ItshMoh
Copy link
Contributor

ItshMoh commented Aug 25, 2024

so like in this http bindings, the user should be able to change the current version ?

cc @jonaslagoni

@jonaslagoni
Copy link
Member Author

@ItshMoh kinda yes, so when binding codeowners make breaking changes, the converter should be able to offer the options for users to migrate bindings as well 😊

@ItshMoh
Copy link
Contributor

ItshMoh commented Aug 28, 2024

what should be the possible approach that i should work upon.?

cc @jonaslagoni

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

No branches or pull requests

2 participants