openapi: 3.0.3 info: title: Collect Map API version: 1.0.0 description: Django backend for Collect Map API - Mountain and Path data management paths: /bear/: get: operationId: bear_list description: BearSighting一覧を取得 parameters: - in: query name: city schema: type: string description: 市区町村でフィルタ - in: query name: limit schema: type: integer description: 取得する最大件数 - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - in: query name: prefecture schema: type: string description: 都道府県でフィルタ tags: - bear security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedBearSightingList' description: '' /mountains/: get: operationId: mountains_list description: Mountain一覧を取得(フィルタリング・ページネーション対応) parameters: - in: query name: limit schema: type: integer description: '取得する最大件数(ページネーション用、デフォルト: 100)' - in: query name: maxlat schema: type: number format: double description: 検索範囲の最大緯度(bboxフィルタ用) - in: query name: maxlon schema: type: number format: double description: 検索範囲の最大経度(bboxフィルタ用) - in: query name: minlat schema: type: number format: double description: 検索範囲の最小緯度(bboxフィルタ用) - in: query name: minlon schema: type: number format: double description: 検索範囲の最小経度(bboxフィルタ用) - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - in: query name: skip schema: type: integer description: 'スキップする件数(ページネーション用、デフォルト: 0)' tags: - mountains security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedMountainList' description: '' post: operationId: mountains_create description: 新規Mountainを作成 tags: - mountains requestBody: content: application/json: schema: $ref: '#/components/schemas/MountainCreate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/MountainCreate' multipart/form-data: schema: $ref: '#/components/schemas/MountainCreate' required: true security: - cookieAuth: [] - basicAuth: [] - {} responses: '201': content: application/json: schema: $ref: '#/components/schemas/MountainCreate' description: '' /mountains/{id}/: get: operationId: mountains_retrieve description: Mountain API ViewSet parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this mountain. required: true tags: - mountains security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/Mountain' description: '' put: operationId: mountains_update description: Mountain情報を更新 parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this mountain. required: true tags: - mountains requestBody: content: application/json: schema: $ref: '#/components/schemas/MountainUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/MountainUpdate' multipart/form-data: schema: $ref: '#/components/schemas/MountainUpdate' required: true security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/MountainUpdate' description: '' patch: operationId: mountains_partial_update description: Mountain API ViewSet parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this mountain. required: true tags: - mountains requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedMountainUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedMountainUpdate' multipart/form-data: schema: $ref: '#/components/schemas/PatchedMountainUpdate' security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/MountainUpdate' description: '' delete: operationId: mountains_destroy description: Mountainを削除 parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this mountain. required: true tags: - mountains security: - cookieAuth: [] - basicAuth: [] - {} responses: '204': description: No response body /mountains/prefectures/: get: operationId: mountains_prefectures_retrieve description: Prefecture一覧を取得 tags: - mountains security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': description: No response body /mountains/types/: get: operationId: mountains_types_retrieve description: Type一覧を取得 tags: - mountains security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': description: No response body /paths/: get: operationId: paths_list description: 指定されたIDのPathの詳細情報を取得 parameters: - in: query name: limit schema: type: integer description: '取得する最大件数(ページネーション用、デフォルト: 100)' - in: query name: maxlat schema: type: number format: double description: 検索範囲の最大緯度(bboxフィルタ用) - in: query name: maxlon schema: type: number format: double description: 検索範囲の最大経度(bboxフィルタ用) - in: query name: minlat schema: type: number format: double description: 検索範囲の最小緯度(bboxフィルタ用) - in: query name: minlon schema: type: number format: double description: 検索範囲の最小経度(bboxフィルタ用) - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - in: query name: skip schema: type: integer description: 'スキップする件数(ページネーション用、デフォルト: 0)' tags: - paths security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedPathList' description: '' /paths/{id}/: get: operationId: paths_retrieve description: 指定されたIDのPathの詳細情報を取得(標高グラフデータ付き) parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this path. required: true tags: - paths security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PathDetail' description: '' /route/: get: operationId: route_list description: ダイクストラ法でstartノードからdestノードまでの最短経路のPath一覧を取得 parameters: - in: query name: dest schema: type: integer description: 終了ノードのnode_id required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - in: query name: start schema: type: integer description: 開始ノードのnode_id required: true tags: - route security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedPathList' description: '' /route/{id}/: get: operationId: route_retrieve description: PathGeometry API ViewSet (Read-only) - Dijkstra shortest path parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this path. required: true tags: - route security: - cookieAuth: [] - basicAuth: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/Path' description: '' components: schemas: BearSighting: type: object description: BearSighting serializer properties: id: type: integer readOnly: true prefecture: type: string title: 都道府県 maxLength: 100 city: type: string title: 市区町村 maxLength: 100 latitude: type: number format: double title: 緯度 longitude: type: number format: double title: 経度 summary: type: string title: 概要 source_url: type: string format: uri title: 情報源URL maxLength: 200 image_url: type: string format: uri nullable: true title: 画像URL maxLength: 200 reported_at: type: string format: date-time title: 報告日時 required: - city - id - latitude - longitude - prefecture - reported_at - source_url - summary Mountain: type: object description: Mountain serializer properties: id: type: integer readOnly: true ptid: type: string maxLength: 255 name: type: string maxLength: 255 yomi: type: string nullable: true maxLength: 255 other_names: type: string nullable: true maxLength: 255 yamatan: type: string nullable: true maxLength: 255 name_en: type: string nullable: true maxLength: 255 elevation: type: number format: double nullable: true lat: type: number format: double nullable: true lon: type: number format: double nullable: true detail: type: string nullable: true area: type: string nullable: true maxLength: 255 photo_url: type: string nullable: true maxLength: 512 page_url: type: string nullable: true maxLength: 512 types: type: array items: $ref: '#/components/schemas/Type' readOnly: true prefectures: type: array items: $ref: '#/components/schemas/Prefecture' readOnly: true created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true required: - created_at - id - name - prefectures - ptid - types - updated_at MountainCreate: type: object description: Mountain作成時のSerializer properties: ptid: type: string maxLength: 255 name: type: string maxLength: 255 yomi: type: string nullable: true maxLength: 255 other_names: type: string nullable: true maxLength: 255 yamatan: type: string nullable: true maxLength: 255 name_en: type: string nullable: true maxLength: 255 elevation: type: number format: double nullable: true lat: type: number format: double nullable: true lon: type: number format: double nullable: true detail: type: string nullable: true area: type: string nullable: true maxLength: 255 photo_url: type: string nullable: true maxLength: 512 page_url: type: string nullable: true maxLength: 512 types: type: array items: $ref: '#/components/schemas/MountainTypeDetail' prefs: type: array items: $ref: '#/components/schemas/Prefecture' required: - name - ptid MountainTypeDetail: type: object description: Mountain-Type関係の詳細情報(中間テーブルのdetailフィールド用) properties: type_id: type: string name: type: string detail: type: string nullable: true required: - name - type_id MountainUpdate: type: object description: Mountain更新時のSerializer(すべてオプショナル) properties: name: type: string maxLength: 255 yomi: type: string nullable: true maxLength: 255 other_names: type: string nullable: true maxLength: 255 yamatan: type: string nullable: true maxLength: 255 name_en: type: string nullable: true maxLength: 255 elevation: type: number format: double nullable: true lat: type: number format: double nullable: true lon: type: number format: double nullable: true detail: type: string nullable: true area: type: string nullable: true maxLength: 255 photo_url: type: string nullable: true maxLength: 512 page_url: type: string nullable: true maxLength: 512 types: type: array items: $ref: '#/components/schemas/MountainTypeDetail' prefs: type: array items: $ref: '#/components/schemas/Prefecture' required: - name PaginatedBearSightingList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/BearSighting' PaginatedMountainList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/Mountain' PaginatedPathList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/Path' PatchedMountainUpdate: type: object description: Mountain更新時のSerializer(すべてオプショナル) properties: name: type: string maxLength: 255 yomi: type: string nullable: true maxLength: 255 other_names: type: string nullable: true maxLength: 255 yamatan: type: string nullable: true maxLength: 255 name_en: type: string nullable: true maxLength: 255 elevation: type: number format: double nullable: true lat: type: number format: double nullable: true lon: type: number format: double nullable: true detail: type: string nullable: true area: type: string nullable: true maxLength: 255 photo_url: type: string nullable: true maxLength: 512 page_url: type: string nullable: true maxLength: 512 types: type: array items: $ref: '#/components/schemas/MountainTypeDetail' prefs: type: array items: $ref: '#/components/schemas/Prefecture' Path: type: object description: Path serializer properties: id: type: integer readOnly: true osm_id: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 type: type: string maxLength: 255 minlat: type: number format: double nullable: true minlon: type: number format: double nullable: true maxlat: type: number format: double nullable: true maxlon: type: number format: double nullable: true geometries: type: array items: $ref: '#/components/schemas/PathGeometryWithSequence' readOnly: true tags: type: array items: $ref: '#/components/schemas/PathTag' readOnly: true created_at: type: string format: date-time readOnly: true updated_at: type: string format: date-time readOnly: true required: - created_at - geometries - id - osm_id - tags - type - updated_at PathDetail: type: object description: Pathの詳細情報Serializer properties: id: type: integer nullable: true path_id: type: integer nullable: true osm_id: type: integer type: type: string difficulty: type: integer nullable: true path_graphic: type: array items: $ref: '#/components/schemas/Point' nullable: true geometries: type: array items: $ref: '#/components/schemas/PathGeometryWithSequence' nullable: true required: - osm_id - type PathGeometryWithSequence: type: object description: PathGeometry with sequence from through model properties: id: type: integer readOnly: true node_id: type: integer readOnly: true lat: type: number format: double readOnly: true lon: type: number format: double readOnly: true sequence: type: integer readOnly: true required: - id - lat - lon - node_id - sequence PathTag: type: object description: PathTag serializer properties: id: type: integer readOnly: true highway: type: string nullable: true maxLength: 255 source: type: string nullable: true maxLength: 255 difficulty: type: integer maximum: 2147483647 minimum: -2147483648 nullable: true kuma: type: string nullable: true maxLength: 255 created_at: type: string format: date-time readOnly: true required: - created_at - id Point: type: object description: 座標点のSerializer properties: x: type: number format: double y: type: number format: double lon: type: number format: double lat: type: number format: double required: - lat - lon - x - y Prefecture: type: object description: Prefecture serializer properties: id: type: integer readOnly: true pref_id: type: string maxLength: 255 name: type: string maxLength: 255 created_at: type: string format: date-time readOnly: true required: - created_at - id - name - pref_id Type: type: object description: Type serializer properties: id: type: integer readOnly: true type_id: type: string maxLength: 255 name: type: string maxLength: 255 created_at: type: string format: date-time readOnly: true required: - created_at - id - name - type_id securitySchemes: basicAuth: type: http scheme: basic cookieAuth: type: apiKey in: cookie name: sessionid servers: - url: http://localhost:8000 description: Local development server