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: /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/Path' description: '' components: schemas: 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 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/PathGeometry' 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 PathGeometry: type: object description: PathGeometry serializer properties: id: type: integer readOnly: true node_id: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 lat: type: number format: double lon: type: number format: double sequence: type: integer maximum: 2147483647 minimum: -2147483648 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 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