Git Product home page Git Product logo

Comments (3)

vanderlee avatar vanderlee commented on July 18, 2024

Do yo have a more complete example of the class? When I try /**...*/ inside a method, it seems to work fine. When I try your example without the api_key line it works just fine. I'm guessing the problem might have something to do with that part of the code or other surrounding code.

from phpswaggergen.

rlanvin avatar rlanvin commented on July 18, 2024

Probably because it's not part of class or a method, I was trying to document Slim Framework routes. However since I opened this bug report in January we have moved to different way of generating documentation, so as far as I'm concerned you can close this bug.

from phpswaggergen.

 avatar commented on July 18, 2024

Hello,
this is bug, imho.

<?php
/**
 * @rest\endpoint /users
 * @rest\method GET Users
 */
public function actionUsers() { .. }

/**
 * @rest\endpoint /users/{id}
 * @rest\path Int id The ID of the User
 * @rest\method GET User
 */
public function actionUserDetail(int $id) { .. }

produces

---
swagger: "2.0"
...
paths:
  /users:
    get: 
        parameters:
      - name: id
        in: path
        description: The ID of the User
        required: true
        type: integer
        format: int32
  /users/{id}:
    get: 
       --> `parameters` is missing here
       ...

I'm using version 2.3.19.

from phpswaggergen.

Related Issues (19)

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.