Git Product home page Git Product logo

Comments (6)

cathcheeno avatar cathcheeno commented on August 23, 2024

@danielbatch
Sorry, but it's hard for me to understand the situation with the information given.
Could you show me a valid full OAS document so I can grab the whole picture of what you are trying to achieve.

from viron.

danielbatch avatar danielbatch commented on August 23, 2024

@cathcheeno
Hi, this is the oas doc. I want to get one article, and the API returns the response as above, but does not move to article#one page when I query to get one(reproduce step2)

openapi: 3.0.0
info:
  description: viron sample
  title: viron-sample
  version: 0.0.1
  x-number:
    responseKey: value
  x-table:
    responseListKey: list
  x-pages:
  - id: articles
    title: list articles
    description: article operations
    group: articles
    contents:
    - title: article list
      type: table
      operationId: getArticles
servers:
- url: /
paths:
  /articles:
    get:
      operationId: getArticles
      parameters:
      - description: Size of list
        in: query
        name: size
        required: false
        schema:
          type: integer
      - description: Page number of list
        in: query
        name: page
        required: false
        schema:
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticleList'
          description: ok
      summary: list articles
      tags:
      - article
  /articles/{id}:
    get:
      operationId: getArticle
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Article'
          description: ok
      summary: get one article
      tags:
      - article
components:
  schemas:
    ArticleList:
      example:
        list:
        - id: id
          price: price
          url: https://openapi-generator.tech
        - id: id
          price: price
          body: body
          url: https://openapi-generator.tech
      properties:
        list:
          items:
            $ref: '#/components/schemas/Article'
          type: array
      required:
      - list
      type: object
    Article:
      example:
        id: id
        price: price
        url: https://openapi-generator.tech
      properties:
        id:
          description: ID
          type: string
        price:
          description: price
          type: number
        url:
          description: URL
          format: uri
          type: string
      required:
      - id
      - price
      - url
      type: object

from viron.

cathcheeno avatar cathcheeno commented on August 23, 2024

@danielbatch
It seems you have only one page, one named articles under info['x-pages'] object, which means there is no page to display resource#one or to navigate to.
Plus, your expected behavior above is not feasible as Viron doesn't have the function(or intention to implement it in the future) to navigate pages after triggering operations.

Please let us know

  • what you plan to display on resource#one page
  • why you want to do so (since the data of resource#one is already on the table content of resource#list page)
    so that the Viron team can discuss adding a new content type for data of type object.

thanks.

from viron.

danielbatch avatar danielbatch commented on August 23, 2024

@cathcheeno
Thanks, understood.

This is my intent,

what you plan to display on resource#one page

All data of one resource with many columns.

why you want to do so (since the data of resource#one is already on the table content of resource#list page)
so that the Viron team can discuss adding a new content type for data of type object.

If the resource has many columns(id, price, url, author, created_at, deleted_at, edited_at...etc), I thought its not convenient to see all data on list page because I have to scroll sideways a lot to find data.

And is it possible to copy uri-format data when tap the column on list page?

For example, the article resource has url column. And the oas definition is this.

 url:
    description: URL
    format: uri
    type: string

I want to copy or open url when tap this column if cannot move to article#one page.
sample-viron

from viron.

cathcheeno avatar cathcheeno commented on August 23, 2024

@danielbatch
I've created issues for the new content type and table cell interaction.

from viron.

danielbatch avatar danielbatch commented on August 23, 2024

@cathcheeno
Thank you. Hope the features will be integrated after discussing with viron developer team.

from viron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.