Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Read only rest api for base objects #13

Closed
hasantayyar opened this issue Jun 10, 2014 · 10 comments
Closed

Read only rest api for base objects #13

hasantayyar opened this issue Jun 10, 2014 · 10 comments
Assignees
Labels
Milestone

Comments

@hasantayyar
Copy link

Journal
Article
Issue
Citation
Contact
Author

@hasantayyar
Copy link
Author

rest api is developing under Ostr/ApiBundle

@hmert
Copy link
Member

hmert commented Jul 2, 2014

@kemalkanok will do this

@kemalkanok
Copy link
Contributor

do we need a Journal/ get api with no id ?

@kemalkanok
Copy link
Contributor

or could you tell me whatkind of services we need ?

@hasantayyar
Copy link
Author

Like :

  • Journal
    • GET api/journals/{id}
    • GET api/journals/{id}/issues
  • Article
    • GET api/articles/{id}

Current methods at /api/doc

@kemalkanok
Copy link
Contributor

7ad14c4
@hasantayyar
I tried to generate an api service but it didn't work can you tell me where did I do wrong ?

as source i found this usage https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/7-manual-route-definition.md#get-route-definition

@hasantayyar
Copy link
Author

  1. In this case you dont need to use @GET annotation because it will be auto generated with your function name as sama as your annotation.
  2. Add Action to your function name.
  3. If you still want to use @GET annotation you must use use FOS\RestBundle\Controller\Annotations\Get;

Fixed version

use FOS\RestBundle\Controller\Annotations\Get;


class JournalRestController extends FOSRestController {

    /**
     *
     * @ApiDoc(
     *  resource=true,
     *  description="Get Journal Issues"
     * )
     * @Get("/journals/{id}/issues")
     */
    public function getJournalIssuesAction($id) {
        return $id;
    }

@hmert
Copy link
Member

hmert commented Jul 3, 2014

May this issue fixed?

hmert added a commit that referenced this issue Jul 11, 2014
@hmert
Copy link
Member

hmert commented Jul 11, 2014

bump

@hmert hmert modified the milestones: Rest Api beta version, 1.0 Aug 23, 2014
@hmert hmert assigned bahattincinic and unassigned kemalkanok Sep 26, 2014
@hmert hmert assigned hmert and unassigned bahattincinic Oct 29, 2014
@hmert
Copy link
Member

hmert commented Oct 29, 2014

there are some implemented parts but this issue is closed for me. I will open more detailed issues

@hmert hmert closed this as completed Oct 29, 2014
hmert added a commit that referenced this issue Nov 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants